private void initConfig() { ordg = new OrOperationGroup(); fEdit = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Regular); fEditB = new Font(ic.iniC.grdViewFontName, ic.grdViewFontSize, FontStyle.Bold); C1ThemeController.ApplicationTheme = ic.iniC.themeApplication; theme1.Theme = C1ThemeController.ApplicationTheme; theme1.SetTheme(sB, "BeigeOne"); foreach (Control c in panel2.Controls) { theme1.SetTheme(c, "Office2013Red"); } bg = txtGiagGrpCode.BackColor; fc = txtGiagGrpCode.ForeColor; ff = txtGiagGrpCode.Font; btnNew.Click += BtnNew_Click; btnSave.Click += BtnSave_Click; btnEdit.Click += BtnEdit_Click; initGrfPosi(); setGrfPosi(); setControlEnable(false); setFocusColor(); sB1.Text = ""; btnVoid.Hide(); txtPasswordVoid.Hide(); stt = new C1SuperTooltip(); sep = new C1SuperErrorProvider(); }
private void initConfig() { ordg = new OrOperationGroup(); ordg.opera_group_id = "opera_group_id"; ordg.opera_group_code = "opera_group_code"; ordg.opera_group_name = "opera_group_name"; ordg.status_or_opera_req = "status_or_opera_req"; ordg.remark = "remark"; ordg.date_create = "date_create"; ordg.date_modi = "date_modi"; ordg.date_cancel = "date_cancel"; ordg.user_create = "user_create"; ordg.user_modi = "user_modi"; ordg.user_cancel = "user_cancel"; ordg.active = "active"; ordg.sort1 = "sort1"; ordg.status_or_us = "status_or_us"; ordg.table = "or_b_operation_group"; ordg.pkField = "opera_group_id"; lDept = new List <OrOperationGroup>(); //getlDept(); }
private void setControl(String posiId) { ordg = ic.ivfDB.ordgDB.selectByPk1(posiId); txtID.Value = ordg.opera_group_id; txtGiagGrpCode.Value = ordg.opera_group_code; txtGiagGrpName.Value = ordg.opera_group_name; //txtPosiNameT.Value = agn.posi_name_t; //txtRemark.Value = agn.remark; //if (posi.status_doctor.Equals("1")) //{ chkSendtoOr.Checked = ordg.status_or_opera_req.Equals("1") ? true : false; chkOrUs.Checked = ordg.status_or_us.Equals("1") ? true : false; //} //else //{ // chkStatusDoctor.Checked = false; //} //if (posi.status_embryologist.Equals("1")) //{ // chkEmbryologist.Checked = true; //} //else //{ // chkEmbryologist.Checked = false; //} }
public void getlOrDiagGroup() { //lDept = new List<Position>(); lDept.Clear(); DataTable dt = new DataTable(); dt = selectAll(); foreach (DataRow row in dt.Rows) { OrOperationGroup dept1 = new OrOperationGroup(); dept1.opera_group_id = row[ordg.opera_group_id].ToString(); dept1.opera_group_code = row[ordg.opera_group_code].ToString(); dept1.opera_group_name = row[ordg.opera_group_name].ToString(); dept1.status_or_opera_req = row[ordg.status_or_opera_req].ToString(); //dept1.remark = row[ordg.remark].ToString(); //dept1.date_create = row[ordg.date_create].ToString(); //dept1.date_modi = row[ordg.date_modi].ToString(); //dept1.date_cancel = row[ordg.date_cancel].ToString(); //dept1.user_create = row[ordg.user_create].ToString(); //dept1.user_modi = row[ordg.user_modi].ToString(); //dept1.user_cancel = row[ordg.user_cancel].ToString(); dept1.active = row[ordg.active].ToString(); lDept.Add(dept1); } }
public OrOperationGroup selectByPk1(String copId) { OrOperationGroup cop1 = new OrOperationGroup(); DataTable dt = new DataTable(); String sql = "select ordg.* " + "From " + ordg.table + " ordg " + //"Left Join t_ssdata_visit ssv On ssv.ssdata_visit_id = bd.ssdata_visit_id " + "Where ordg." + ordg.pkField + " ='" + copId + "' "; dt = conn.selectData(conn.conn, sql); cop1 = setOrDiagGroup(dt); return(cop1); }
public String insertOrDiagGroup(OrOperationGroup p, String userId) { String re = ""; if (p.opera_group_id.Equals("")) { re = insert(p, userId); } else { re = update(p, userId); } return(re); }
public String insert(OrOperationGroup p, String userId) { String re = ""; String sql = ""; p.active = "1"; //p.ssdata_id = ""; int chk = 0; p.date_modi = p.date_modi == null ? "" : p.date_modi; p.date_cancel = p.date_cancel == null ? "" : p.date_cancel; p.user_create = p.user_create == null ? "" : p.user_create; p.user_modi = p.user_modi == null ? "" : p.user_modi; p.user_cancel = p.user_cancel == null ? "" : p.user_cancel; p.opera_group_code = p.opera_group_code == null ? "" : p.opera_group_code; p.opera_group_name = p.opera_group_name == null ? "" : p.opera_group_name; p.status_or_opera_req = p.status_or_opera_req == null ? "0" : p.status_or_opera_req; p.remark = p.remark == null ? "" : p.remark; p.sort1 = p.sort1 == null ? "" : p.sort1; p.status_or_us = p.status_or_us == null ? "0" : p.status_or_us; sql = "Insert Into " + ordg.table + " Set " + "" + ordg.opera_group_code + " = '" + p.opera_group_code + "' " + "," + ordg.opera_group_name + " = '" + p.opera_group_name.Replace("'", "''") + "' " + "," + ordg.status_or_opera_req + " = '" + p.status_or_opera_req + "' " + "," + ordg.remark + " = '" + p.remark.Replace("'", "''") + "' " + "," + ordg.date_create + " = now() " + "," + ordg.date_modi + " = '" + p.date_modi + "' " + "," + ordg.date_cancel + " = '" + p.date_cancel + "' " + "," + ordg.user_create + " = '" + p.user_create + "' " + "," + ordg.user_modi + " = '" + p.user_modi + "' " + "," + ordg.user_cancel + " = '" + p.user_cancel + "' " + "," + ordg.active + " " + " = '" + p.active + "' " + "," + ordg.sort1 + " " + " = '" + p.sort1 + "' " + "," + ordg.status_or_us + " " + " = '" + p.status_or_us + "' " + " "; try { re = conn.ExecuteNonQuery(conn.conn, sql); } catch (Exception ex) { sql = ex.Message + " " + ex.InnerException; } return(re); }
private OrOperationGroup setOrDiagGroup(DataTable dt) { OrOperationGroup dept1 = new OrOperationGroup(); if (dt.Rows.Count > 0) { dept1.opera_group_id = dt.Rows[0][ordg.opera_group_id].ToString(); dept1.opera_group_code = dt.Rows[0][ordg.opera_group_code].ToString(); dept1.opera_group_name = dt.Rows[0][ordg.opera_group_name].ToString(); dept1.status_or_opera_req = dt.Rows[0][ordg.status_or_opera_req].ToString(); dept1.remark = dt.Rows[0][ordg.remark].ToString(); dept1.date_create = dt.Rows[0][ordg.date_create].ToString(); dept1.date_modi = dt.Rows[0][ordg.date_modi].ToString(); dept1.date_cancel = dt.Rows[0][ordg.date_cancel].ToString(); dept1.user_create = dt.Rows[0][ordg.user_create].ToString(); dept1.user_modi = dt.Rows[0][ordg.user_modi].ToString(); dept1.user_cancel = dt.Rows[0][ordg.user_cancel].ToString(); dept1.active = dt.Rows[0][ordg.active].ToString(); dept1.sort1 = dt.Rows[0][ordg.sort1].ToString(); dept1.status_or_us = dt.Rows[0][ordg.status_or_us].ToString(); } else { dept1.opera_group_id = ""; dept1.opera_group_code = ""; dept1.opera_group_name = ""; dept1.status_or_opera_req = ""; dept1.remark = ""; dept1.date_create = ""; dept1.date_modi = ""; dept1.date_cancel = ""; dept1.user_create = ""; dept1.user_modi = ""; dept1.user_cancel = ""; dept1.active = ""; dept1.sort1 = ""; dept1.status_or_us = ""; } return(dept1); }