private bool SavePersonal() { bool ret = false; PersonalPara para = new PersonalPara(); para.ID = (txtID.Text != "" ? Convert.ToInt64(txtID.Text) : 0); para.STAFF_CODE = txtStaffCode.Text.Trim(); para.TITLE_NAME = cmbTitleName.Text.Trim(); para.FIRST_NAME = txtFirstName.Text.Trim(); para.LAST_NAME = txtLastName.Text.Trim(); PersonalFunc fnc = new PersonalFunc(); ret = fnc.SavePersonal(para); return ret; }
private void txtStaffCode_TextChanged(object sender, EventArgs e) { PersonalPara para = new PersonalPara(); PersonalFunc fnc = new PersonalFunc(); para = fnc.GetDataByStaffCode(txtStaffCode.Text.Trim()); txtID.Text = para.ID.ToString(); cmbTitleName.Text = para.TITLE_NAME; txtFirstName.Text = para.FIRST_NAME; txtLastName.Text = para.LAST_NAME; }