//------------------------------------------------------------- /// <summary> /// 参照 U8职员档案 /// </summary> private void RefPerson(object obj, EventArgs e) { IRefDAL dal = new HrPersonDAL(Information.UserInfo.ConnU8); RefForm frm = new RefForm(dal); if (frm.ShowDialog() == DialogResult.OK) { (obj as TextBox).Text = frm.rows[0]["cPsn_Name"].ToString(); } }
private void txt_worker_ButtonCustomClick(object sender, EventArgs e) { IRefDAL dal = new HrPersonDAL(Information.UserInfo.ConnU8); RefForm frm = new RefForm(dal); if (frm.ShowDialog() == DialogResult.OK) { this.txt_worker.Text = frm.rows[0]["cPsn_Name"].ToString(); this.txtr_cDepName.Text = frm.rows[0]["cDepName"].ToString(); card.M.curOperation.cDepCode = frm.rows[0]["cDepCode"].ToString(); } }
private void GetPerson(string cPerson) { var dal = new HrPersonDAL(Information.UserInfo.ConnU8); var row = dal.Get(txt_worker.Text.Trim()); if (row == null) { throw new Exception("操作员编码: " + txt_worker.Text + " 不存在!"); } this.card.M.curOperation.cDepCode = row["cDepCode"].ToString(); this.txt_worker.Text = row["cPsn_Name"].ToString(); this.txtr_cDepName.Text = row["cDepName"].ToString(); }