示例#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();
 }
示例#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();
 }
示例#3
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 = "ClientID";
     frmSch.strHeader2 = "Clientname";
     frmSch.strHeader3 = "";
     string strQuery = string.Empty;
     strQuery = "select customerid as ClientID, companyname  as Clientname from customers";
     frmSch._getData_RIMS(strQuery);
     frmSch.ShowDialog();
 }
示例#4
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();
 }
示例#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();
 }
示例#6
0
        private void btnrequest_Click(object sender, EventArgs e)
        {
            Program._searchedValue = string.Empty;
            string strClientId = "'" + txtclientid.Text + "'";

            if (txtclientid.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Select Client", "RnS Notification");
                return;
            }
            Program._searchedValue2 = string.Empty;
            Program._searchedValue = string.Empty;

            frmsearch frmSch = new frmsearch();
            frmSch.FormClosed += new FormClosedEventHandler(frmSch_FormClosed2);
            frmSch.strHeader1 = "RequestId";
            frmSch.strHeader2 = "Position";
            frmSch.strHeader3 = "PositionId";
            frmSch.strHeader4 = "Title";
            string strQuery = string.Empty;
            strQuery = "select distinct requestid as RequestId, position  as Position, poscode as PositionId,title as Title from clientrequest where status = 'false' and clientid = " + strClientId;
            frmSch._getData(strQuery);
            frmSch.ShowDialog();
        }
示例#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();
            }
        }