Beispiel #1
0
 private void btnUserID_Click(object sender, EventArgs e)
 {
     try {
         FrmUserSelectDlg frmUserDlg = new FrmUserSelectDlg();
         frmUserDlg.DeptName = "业务部";
         if (frmUserDlg.ShowDialog() == DialogResult.OK)
         {
             DataRowView userRow  = frmUserDlg.SelectRow;
             string      userID   = userRow["USERID"].ToString();
             string      userName = userRow["USERNAME"].ToString();
             this.UserID = UserID;
         }
     }
     catch (Exception ex)
     {
         UserMessages.ShowInfoBox(ex.Message);
     }
 }
Beispiel #2
0
        private void btnWQ_Click(object sender, EventArgs e)
        {
            try
            {
                int[]         rowindexs = gridView1.GetSelectedRows();
                List <string> rowids    = new List <string>();
                if (rowindexs.Length > 0)
                {
                    FrmUserSelectDlg frmUserDlg = new FrmUserSelectDlg();
                    frmUserDlg.DeptName = Security.DeptName;
                    if (frmUserDlg.ShowDialog() == DialogResult.OK)
                    {
                        DataRowView rv = frmUserDlg.SelectRow;
                        if (rv != null)
                        {
                            string userName = rv["USERNAME"].ToString();
                            string userID   = rv["USERID"].ToString();

                            foreach (int rowIndex in rowindexs)
                            {
                                DataRowView selRow = gridView1.GetRow(rowIndex) as DataRowView;
                                rowids.Add(selRow["TW_BusinessRegID"].ToString());
                            }
                            foreach (string regID in rowids)
                            {
                                DataRow row = businessDataSet.TW_BusinessReg.FindByTW_BusinessRegID(regID);
                                row.BeginEdit();
                                row["外勤员"]   = userName;
                                row["外勤员ID"] = userID;
                                row.EndEdit();
                            }
                            //保存数据
                            businessDataSet.SaveTable();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #3
0
 private void accountantBtn_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         FrmUserSelectDlg frmUserDlg = new FrmUserSelectDlg();
         frmUserDlg.DeptName = "业务部";
         if (frmUserDlg.ShowDialog() == DialogResult.OK)
         {
             DataRowView userRow  = frmUserDlg.SelectRow;
             string      userID   = userRow["USERID"].ToString();
             string      userName = userRow["USERNAME"].ToString();
             this.UserID        = UserID;
             accountantBtn.Text = userName;
         }
     }
     catch (Exception ex)
     {
         UserMessages.ShowInfoBox(ex.Message);
     }
 }
Beispiel #4
0
 private void 做账会计TextEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try {
         FrmUserSelectDlg frmUserDlg = new FrmUserSelectDlg();
         if (frmUserDlg.ShowDialog() == DialogResult.OK)
         {
             DataRowView rv       = frmUserDlg.SelectRow;
             string      userID   = rv["USERID"].ToString();
             string      userName = rv["USERNAME"].ToString();
             DataRowView wRv      = tW_ClientBindingSource.Current as DataRowView;
             wRv.BeginEdit();
             wRv["做账会计ID"] = userID;
             wRv["做账会计"]   = userName;
             wRv.EndEdit();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }