Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

Illegal Operation

@Illegal Operation
About
Posts
217
Topics
157
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Clone Windows Forms Information
    I Illegal Operation

    Hi! I have a question. I have two forms, Form1 and Form2. I add two textboxes to form1 and the same with form2 I fill in the textboxes on form1 and save the information to sql templatetable1. I need to display a list of entries from form1 in a dropdonwlist and when the user selects an entry, form2 needs to be populated by the selected template. How can I do this?

    Illegal Operation

    C# question database winforms

  • GridView Session
    I Illegal Operation

    Hi, I need some help. I have an aspx page called Services.aspx and a Page called OrderConfirmation.aspx. On the Services page the user can fill in the form that will allow him to specify quantity of orders. I save this information to an arraylist and then send this arraylist to the OrderConfirmation page using the Session variable. My question is this: I have added a gridview to the OrderConfirmation page and bind the data to the session variable. How can I display the results in their own columns? I am returning the ProductCode, Description and Quantity. At the moment they all display in one column. Thanks!!

    Illegal Operation

    ASP.NET question help

  • ListBox SelectedItem
    I Illegal Operation

    Hi, I have created 2 ListBoxes. ListBox1 gets its values from a dataset. I need to enable the user to select an item in listbox1 and then move it to listbox2. The problem I am having is the following: When I select an item in listbox1 and click the button to move that item to listbox2, I get System.Data.DataRowView. How can I display the SelectedItem in ListBox2 instead of System.Data.DataRowView? Thanks!

    Illegal Operation

    C# question help

  • DataSet to List<>
    I Illegal Operation

    Luc, I have dataset that contains Items from my database. What I want to do is list all those payitems in listbox1 and then enable to user to add selecteditems to listbox2.

    Illegal Operation

    C# question

  • DataSet to List<>
    I Illegal Operation

    I need to create a list of type Dataset. Here is my code at the moment

    List<> dsList = new List<>();

    dsList.Add(payClass.GetPayItems());

    How would I bind that list to a ListBox? P.S - I added to << and >> because when posting it removes it.

    Illegal Operation

    C# question

  • DataSet to List<>
    I Illegal Operation

    Hi! How can I take data from a dataset and populate a List<>()?

    Illegal Operation

    C# question

  • ListBox Controls
    I Illegal Operation

    Hi! I have a question. I have two ListBoxes with an Add and Remove Button. Currently I list all my options in ListBox1 using the following code:

    ListBox1.DataSource = payItemClass.GetPayItems();
    ListBox1.DisplayMember = "PayItem.Code";
    ListBox1.ValueMember = "PayItem.Id";

    How can I move the items I select in ListBox1 to ListBox2 and then save them to my sql table? Thank you in Advance!!

    Illegal Operation

    C# question database

  • LINQ Loop Function
    I Illegal Operation

    Hi, I have a problem. I have a SQL database with 2 tables and in the same database I have created 2 new tables that basically takes the information from the first 2 tables. My question is this: How can I itterate throught the first tables and write that information to the new tables using LINQ to SQL?

    Illegal Operation

    LINQ question database csharp linq help

  • Return a List using LINQ
    I Illegal Operation

    Thank you! That worked. Another quick question? I have a LINQ query returning results

            var OrderHeader = (from OrderHeaders in db.OEORDHs
                               where OrderHeaders.COMPLETE != 5 && OrderHeaders.COMPLETE != 4 && OrderHeaders.COMPLETE != 3
                               orderby OrderHeaders.ORDUNIQ descending
                               select OrderHeaders);
    

    How can I assign the results to properties? I have created a property named pCustomer and modified the code but that does not work.

            var OrderHeader = (from OrderHeaders in db.OEORDHs
                               where OrderHeaders.COMPLETE != 5 && OrderHeaders.COMPLETE != 4 && OrderHeaders.COMPLETE != 3
                               orderby OrderHeaders.ORDUNIQ descending
                               select new
    

    {
    pCustomer = OrderHeaders.Customer
    });

    Illegal Operation

    LINQ question csharp database linq help

  • Return a List using LINQ
    I Illegal Operation

    Yes and I get this error Cannot implicitly convert type'System.Collections.Generic.List<WindowsFormsApplication1.SF_SelectLatestOrderEntryResult>' to 'System.Collections.Generic.List

    Illegal Operation

    LINQ question csharp database linq help

  • Return a List using LINQ
    I Illegal Operation

    Hi! I need some help. This is very trivial but I seem to be struggling. How do I return a List from the below mentioned code?

    private List GetOrderHeaders()
    {
    var TestVar = from OH in db.SF_GetLatestOrderEntry()
    select OH;
    }

    Illegal Operation

    LINQ question csharp database linq help

  • C# Times
    I Illegal Operation

    Hi! I have a problem. I have created a time sheet system that enables a person to enter a start time and an end time. It then calculates the total hours worked. The problem I have is this: When a person has been on lunch from say 11:00 to 11:30 and then wants to enter a time worked say 11:15 then an exception should be thrown stating that times cannot overlap. How will I go about checking for this? Thanks in advance!!

    Illegal Operation

    C# csharp help question

  • Interesting Times...
    I Illegal Operation

    Hi! I have an interesting problem. I have an application that contains two textboxes. The user enters his StartTime in one textbox and his EndTime in the other. I have a calculation method that calculated the total Hours between these two variables. The problem I am having is that when the user inserts the starttime say 8:00 and finish time say 7:00 you will get a -1 hour. How can I prevent users from entering negative values?? My method looks like this:

        private void CalculateHoursWorked()
        {
            string startTime = Convert.ToDateTime(txtStartTime.Text).ToShortTimeString();
            DateTime startDate = Convert.ToDateTime(startTime);
            string endTime = Convert.ToDateTime(txtEndTime.Text).ToShortTimeString();
            DateTime endDate = Convert.ToDateTime(endTime);
    
            TimeSpan ts = endDate.Subtract(startDate);
    
            HoursWorked = ts.Hours.ToString();
            MinutesWorked = ts.Minutes.ToString();
        }
    

    Illegal Operation

    C# question help

  • GridViews and Properties...
    I Illegal Operation

    Thanks for that tip. I will look into using session variables in the future. I did add this variable to my Data Access Layer so its not in my web application at the moment.

    Illegal Operation

    ASP.NET question

  • GridViews and Properties...
    I Illegal Operation

    I have fixed the issue. Basically I changed the DateTime Property to static. Thanks for the reply's...

    Illegal Operation

    ASP.NET question

  • GridViews and Properties...
    I Illegal Operation

    Hi! I have a Gridview that contains a TextBox that displays a Date and a Button. How can I get the Date from the TextBox and Assign it to a DateTime Property so that I can pass that to another function?

    Illegal Operation

    ASP.NET question

  • GridView Row Selection
    I Illegal Operation

    Hi! I have a Stored Procedure that groups information by date and calculate the amount of hours. On the Page_Load method I execute the Stored Procedure and then Display a GridView containing the Date and Total Hours. The problem I am having is that I have added a button and when you click on it, it should get the value from the Date cell. For example: If you click on the 20/01/2010 row then all the entries for that date should be displayed in another gridview. Thanks for the help!

    Illegal Operation

    ASP.NET help database tutorial

  • SQL Calculation...
    I Illegal Operation

    Hi, Can someone please advise me on what to do with this issue. I have a table that has a DATE, GROSSHOURS, GROSSMINUTES and TOTAL. I have a select query that takes the GROSSHOURS and GROSSMINUTES and add them together in seconds e.g: 1H 30M = 90M My issue is this: I have 2 lines on the same day. 2010/01/05 1HOUR 30MINUTES 90MINUTES 2010/01/05 2HOURS 20MINUTES 140MINUTES How will I write a select statement where I can only display 1 line for 2010/01/05 but with both totals? 2010/01/05 230MINUTES My statement looks like this at the moment:

    Select Id, CONVERT(VARCHAR,EntryDate,111) AS EntryDate, GrossHours, GrossMinutes, DATEDIFF(minute, StartJob, EndJob) / 60 * 60 + GrossMinutes AS Total FROM [Timesheet] GROUP BY Id, EntryDate, GrossHours, GrossMinutes, StartJob, EndJob

    Thank you!

    Illegal Operation

    Database database help question

  • GROUP BY Clause...
    I Illegal Operation

    Hi! I have a table that contains a Date and Minutes. I want to create a query to group the entries by Date so that instead of seeing more than one entry on a day, you will only see one entry date with the total minutes? Can anyone shed some light on this issue? Thank you!!

    Illegal Operation

    Database database help question

  • SQL Between Stored Proc
    I Illegal Operation

    Hi! Can someone please tell me how would I go about creating a Stored Proc to select records between dates? I have 2 variables, date1 and date2 I want to create a stored proc as follows: select * from table between date1 and date2 where the dates are variables in the stored proc.

    Illegal Operation

    Database database question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups