metador's Profile User Rating: -----

Reputation: -1 Dishonored
Group:
Members
Active Posts:
21 (0.03 per day)
Joined:
18-June 11
Profile Views:
514
Last Active:
User is offline Jul 27 2011 05:15 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   metador has not set their status

Posts I've Made

  1. In Topic: Dropdown Items On key press event From Database

    Posted 20 Jul 2011

    thanks for help.....
    i will check this.....

    View PostJeff H, on 20 July 2011 - 11:30 PM, said:

    Have you looked at a the textbox properties
    AutoCompleteCustomSource
    &
    AutoCompleteMode?

    http://msdn.microsof...stomsource.aspx
    http://msdn.microsof...mpletemode.aspx
  2. In Topic: Phone number format problem

    Posted 18 Jul 2011

    Thanks it works for me but when i load form, mask format is also visible in mask textbox. how i send mask textbox empty that i do not show its format like "___-_______"


    View Postparadoxia, on 17 July 2011 - 11:34 PM, said:

    you can use the maskedtextbox control. Then you can set the mask property to this 000-0000. you have even some predefined formats.
  3. In Topic: How to restrict user to single entry per month through query

    Posted 13 Jul 2011

    Thanks for help.I got first point.
    actually employee salaries are not fixed for each month.So manually enter each month.
    And kindly give me one more help that when i change date from datetimepicker suppose select last month any date then how that month salary should display in salary textbox means after calling this event
    private void dateTimePicker1_ValueChanged_1(object sender, EventArgs e)
    



    View PostFlashM, on 13 July 2011 - 06:47 AM, said:

    each salary record should have information about when it was inserted... then before update-ing it, check the date value... if it's in the same month => don't allow to update it...

    Why are you even updating same salary record... you really should have new salary record for each employee each month... You need to keep track of employee salaries...

    best regards
  4. In Topic: How to view only on going daily sale record in datagrid through combo

    Posted 8 Jul 2011

    there is the problem on the query to select right on going date

     else if (cmbCategory.SelectedIndex == 2)
                    {
                        groupBox1.Enabled = false;
                        cmbName.Enabled = false;
    
                        int rowz = DGridCustomer.Rows.Count;
                        for (int i = 0; i < rowz; i++)
                            DGridCustomer.Rows.RemoveAt(0);
    
                        dt = new DateTime();
                    
                        dt = DateTime.Now;
                        MessageBox.Show(dt.ToString());
                       
                        string datechange;
                        string[] date = Regex.Split(dt.ToString(), @"\D+");
                        {
                            datechange = date[0] + "/" + date[1];// +"/" + date[2];
                            MessageBox.Show(datechange);
                        }
                       
                       // string str = string.Format("{0:yyyy/MM/dd}", dt); //Convert date format
                       // MessageBox.Show(str);
                        string customerQuery = "SELECT OrderID,OrderDateTime,OrderPrice,Paid from `Order` where Type = '" + cmbCategory.SelectedIndex + "' AND OrderDateTime LIKE '%" + datechange+ "%';";
                        cmd = new OdbcCommand(customerQuery, con);
                        MessageBox.Show(customerQuery.ToString());
                        OdbcDataReader dr = cmd.ExecuteReader();
                        //read through dataReader
                        int row = 0;
                        int col = 0;
                        MessageBox.Show("a");
                        while (dr.Read()) //we know one record so calling if... more record call while loop
                        {
                            MessageBox.Show("b");
                            row = DGridCustomer.Rows.Add(); // will add new row in datagrid and return the row no
    
                            DGridCustomer[col, row].Value = dr.GetValue(0).ToString();
                            col++;
                            DGridCustomer[col, row].Value = dr.GetValue(1).ToString();
                            col += 1;
                            DGridCustomer[col, row].Value = dr.GetValue(2).ToString();
                            col += 1;
                            DGridCustomer[col, row].Value = dr.GetValue(3).ToString();
                            col = 0; //reset coloumn value
                        }
    


    View PostVishu Sukhdev, on 08 July 2011 - 03:35 AM, said:

    Hi,
    I Assume that you have Sqlserver
    "SELECT * FROM table_name WHERE CONVERT(VARCHAR(10),OrderDateTime,111)=CONVERT(VARCHAR(10),GETDATE(),111) AND CustomerName='"+ combobox.Text +"'"
    
    
  5. In Topic: Combobox Selected Index Change Problem

    Posted 24 Jun 2011

    thanks for answ vishu ....

    you r rite it works only if table has only employeeID or FirstName . I just give the example of two column, if we have EmployeeID, FirstName, LastName, Address, JobDescription columns in Employee Table then how we populate all column records through selected index change event in textboxes .... and combobox has display and value member as well.
    I tried ur code. it select value at form_load event automatically(this is another problem that when form loads .all records automatically filled in textboxes .

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

metador has no profile comments yet. Why not say hello?