Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     Program._searchedValue = "";
     frmsearch frmSch = new frmsearch();
     frmSch.FormClosed += new FormClosedEventHandler(frmSch_FormClosed);
     frmSch._returnCellIndex = 0;
     frmSch.strHeader1 = "Userid";
     frmSch.strHeader2 = "Names";
     string strQuery = string.Empty;
     strQuery = "select userid as UserId, names as Names from useracct";
     frmSch._getData(strQuery);
     frmSch.ShowDialog();
 }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     Program._searchedValue = string.Empty;
     frmsearch frmSch = new frmsearch();
     frmSch.FormClosed += new FormClosedEventHandler(frmSch_FormClosed);
     frmSch._returnCellIndex = 0;
     frmSch.strHeader1 = "Id";
     frmSch.strHeader2 = "Surname";
     frmSch.strHeader3 = "Middlename";
     string strQuery = string.Empty;
     strQuery = "select recrno as Id, surname  as Surname, (firstname + middlename) as Middlename from database1";
     frmSch._getData(strQuery);
     frmSch.ShowDialog();
 }
Ejemplo n.º 3
0
 private void btnposcode_Click(object sender, EventArgs e)
 {
     Program._searchedValue = string.Empty;
     Program._searchedValue2 = string.Empty;
     frmsearch frmSch = new frmsearch();
     frmSch.FormClosed += new FormClosedEventHandler(frmSch_position);
     frmSch._returnCellIndex = 0;
     frmSch.strHeader1 = "Code";
     frmSch.strHeader2 = "Description";
     frmSch.strHeader3 = " ";
     frmSch.useRIMSConnString = true;
     string strQuery = string.Empty;
     strQuery = "select code as Code, desc1  as Description from codestab where option1 = 'POSIT'";
     frmSch._getData(strQuery);
     frmSch.ShowDialog();
 }
Ejemplo n.º 4
0
 private void btnclient_Click(object sender, EventArgs e)
 {
     Program._searchedValue = string.Empty;
     Program._searchedValue2 = string.Empty;
     frmsearch frmSch = new frmsearch();
     frmSch.FormClosed += new FormClosedEventHandler(frmSch_client);
     frmSch._returnCellIndex = 0;
     frmSch.strHeader1 = "ClientID";
     frmSch.strHeader2 = "Clientname";
     frmSch.strHeader3 = " ";
     frmSch.useRIMSConnString = true;
     string strQuery = string.Empty;
     strQuery = "select customerid as ClientID, companyname  as Clientname from customers";
     frmSch._getData(strQuery);
     frmSch.ShowDialog();
 }
Ejemplo n.º 5
0
 private void btnclient_Click(object sender, EventArgs e)
 {
     Program._searchedValue = string.Empty;
     Program._searchedValue2 = string.Empty;
     frmsearch frmSch = new frmsearch();
     frmSch.FormClosed += new FormClosedEventHandler(frmSch_client);
     frmSch._returnCellIndex = 0;
     frmSch.strHeader1 = "recrno";
     frmSch.strHeader2 = "names";
     frmSch.strHeader3 = "";
     frmSch.strHeader4 = "";
     string strQuery = string.Empty;
     strQuery = "select recrno, rtrim([surname])+' '+rtrim([firstname])+' '+rtrim([middlename]) as names from database2";
     frmSch._getData(strQuery);
     frmSch.ShowDialog();
 }
Ejemplo n.º 6
0
        private void button12_Click(object sender, EventArgs e)
        {

            Program._searchedValue = string.Empty;
            Program._searchedValue2 = string.Empty;
            string strClientId = "'" + txtclient.Text.Trim() + "'";

            if (txtclient.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Select Client", "RnS Notification");
                return;
            }
            frmsearch frmSch = new frmsearch();
            frmSch.FormClosed += new FormClosedEventHandler(frmSch_request);
            frmSch.strHeader1 = "RequestId";
            frmSch.strHeader2 = "Title";
            frmSch.strHeader3 = "Position";
            string strQuery = string.Empty;
            strQuery = "select distinct requestid as RequestId, Title,position  from clientrequest where status=0 and clientid = " + strClientId;
            frmSch._getData(strQuery);
            frmSch.ShowDialog();
        }
Ejemplo n.º 7
0
        private void grdClientRequest_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            //System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
            //messageBoxCS.AppendFormat("{0} = {1}", "ColumnIndex", e.ColumnIndex);
            //messageBoxCS.AppendLine();
            //messageBoxCS.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex);
            //messageBoxCS.AppendLine();
            //MessageBox.Show(messageBoxCS.ToString(), "CellContentDoubleClick Event");

            _doubleClickSelColIndex = e.ColumnIndex;
            _doubleClickSelRowIndex = e.RowIndex;

            string strQuery = string.Empty;

            if (e.ColumnIndex == 1) // position
            {
                strQuery = "select code, desc1  as description from codestab where option1 = 'POSIT' ";

            }

            if (e.ColumnIndex == 2 || e.ColumnIndex == 3 || e.ColumnIndex == 4 || e.ColumnIndex == 5) // qual1
            {
                strQuery = "select code, desc1  as description from codestab where option1 = 'QUALIF' ";
            }

            if (e.ColumnIndex == 7) // location
            {
                strQuery = "select code, desc1  as description from codestab where option1 = 'LGACODE' ";
            }

            if (e.ColumnIndex == 1 || e.ColumnIndex == 2 || e.ColumnIndex == 3 || e.ColumnIndex == 4 || e.ColumnIndex == 5 || e.ColumnIndex == 7)
            {
                Program._searchedValue = string.Empty;

                frmsearch frmSch = new frmsearch();
                frmSch.FormClosed += new FormClosedEventHandler(open_grid_forSearch);
                frmSch.strHeader1 = "Code";
                frmSch.strHeader2 = "Description";
                frmSch.strHeader3 = "";
                frmSch.useRIMSConnString = true;
                frmSch._getData(strQuery);
                frmSch.ShowDialog();
            }
        }