Exemple #1
0
        public void getlOrDiagGroup()
        {
            //lDept = new List<Position>();

            lDept.Clear();
            DataTable dt = new DataTable();

            dt = selectAll();
            foreach (DataRow row in dt.Rows)
            {
                OrAnesthesia dept1 = new OrAnesthesia();
                dept1.anesthesia_id      = row[oranes.anesthesia_id].ToString();
                dept1.anesthesia_code    = row[oranes.anesthesia_code].ToString();
                dept1.anesthesia_code_ex = row[oranes.anesthesia_code_ex].ToString();

                dept1.anesthesia_name = row[oranes.anesthesia_name].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[oranes.active].ToString();
                lDept.Add(dept1);
            }
        }
        private void initConfig()
        {
            oranes = new OrAnesthesia();

            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 setControl(String posiId)
 {
     oranes               = ic.ivfDB.oranesDB.selectByPk1(posiId);
     txtID.Value          = oranes.anesthesia_id;
     txtGiagGrpCode.Value = oranes.anesthesia_code;
     txtGiagGrpName.Value = oranes.anesthesia_name;
     //txtPosiNameT.Value = agn.posi_name_t;
     //txtRemark.Value = agn.remark;
     //if (posi.status_doctor.Equals("1"))
     //{
     //chkSendtoOr.Checked = oranes.status_or_diag_req.Equals("1") ? true : false;
     //chkOrUs.Checked = oranes.status_or_us.Equals("1") ? true : false;
     //}
     //else
     //{
     //    chkStatusDoctor.Checked = false;
     //}
     //if (posi.status_embryologist.Equals("1"))
     //{
     //    chkEmbryologist.Checked = true;
     //}
     //else
     //{
     //    chkEmbryologist.Checked = false;
     //}
 }
Exemple #4
0
        public OrAnesthesia selectByPk1(String copId)
        {
            OrAnesthesia cop1 = new OrAnesthesia();
            DataTable    dt   = new DataTable();
            String       sql  = "select ordg.* " +
                                "From " + oranes.table + " ordg " +
                                //"Left Join t_ssdata_visit ssv On ssv.ssdata_visit_id = bd.ssdata_visit_id " +
                                "Where ordg." + oranes.pkField + " ='" + copId + "' ";

            dt   = conn.selectData(conn.conn, sql);
            cop1 = setOrDiagGroup(dt);
            return(cop1);
        }
Exemple #5
0
        public String insertOrDiagGroup(OrAnesthesia p, String userId)
        {
            String re = "";

            if (p.anesthesia_id.Equals(""))
            {
                re = insert(p, userId);
            }
            else
            {
                re = update(p, userId);
            }

            return(re);
        }
Exemple #6
0
        public String insert(OrAnesthesia 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.anesthesia_code    = p.anesthesia_code == null ? "" : p.anesthesia_code;
            p.anesthesia_code_ex = p.anesthesia_code_ex == null ? "" : p.anesthesia_code_ex;
            p.anesthesia_name    = p.anesthesia_name == null ? "0" : p.anesthesia_name;
            p.remark             = p.remark == null ? "" : p.remark;
            p.sort1 = p.sort1 == null ? "" : p.sort1;

            sql = "Insert Into " + oranes.table + " Set " +
                  "" + oranes.anesthesia_code + " = '" + p.anesthesia_code + "' " +
                  "," + oranes.anesthesia_code_ex + " = '" + p.anesthesia_code_ex + "' " +
                  "," + oranes.anesthesia_name + " = '" + p.anesthesia_name + "' " +
                  "," + oranes.remark + " = '" + p.remark + "' " +
                  "," + oranes.date_create + " = now() " +
                  "," + oranes.date_modi + " = '" + p.date_modi + "' " +
                  "," + oranes.date_cancel + " = '" + p.date_cancel + "' " +
                  "," + oranes.user_create + " = '" + p.user_create + "' " +
                  "," + oranes.user_modi + " = '" + p.user_modi + "' " +
                  "," + oranes.user_cancel + " = '" + p.user_cancel + "' " +
                  "," + oranes.active + " " + " = '" + p.active + "' " +
                  "," + oranes.sort1 + " " + " = '" + p.sort1 + "' " +
                  " ";
            try
            {
                re = conn.ExecuteNonQuery(conn.conn, sql);
            }
            catch (Exception ex)
            {
                sql = ex.Message + " " + ex.InnerException;
            }

            return(re);
        }
Exemple #7
0
        public String update(OrAnesthesia p, String userId)
        {
            String re  = "";
            String sql = "";
            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.anesthesia_code    = p.anesthesia_code == null ? "" : p.anesthesia_code;
            p.anesthesia_code_ex = p.anesthesia_code_ex == null ? "" : p.anesthesia_code_ex;
            p.anesthesia_name    = p.anesthesia_name == null ? "0" : p.anesthesia_name;
            p.remark             = p.remark == null ? "" : p.remark;
            p.sort1 = p.sort1 == null ? "" : p.sort1;

            sql = "Update " + oranes.table + " Set " +
                  "" + oranes.anesthesia_code + " = '" + p.anesthesia_code + "' " +
                  "," + oranes.anesthesia_code_ex + " = '" + p.anesthesia_code_ex + "' " +
                  "," + oranes.anesthesia_name + " = '" + p.anesthesia_name.Replace("'", "''") + "' " +
                  "," + oranes.remark + " = '" + p.remark.Replace("'", "''") + "' " +
                  "," + oranes.date_modi + " = now() " +
                  "," + oranes.user_modi + " = '" + p.user_modi + "' " +
                  "," + oranes.active + " " + " = '" + p.active + "' " +
                  "," + oranes.sort1 + " " + " = '" + p.sort1 + "' " +
                  "Where " + oranes.pkField + "='" + p.anesthesia_id + "'"
            ;

            try
            {
                re = conn.ExecuteNonQuery(conn.conn, sql);
            }
            catch (Exception ex)
            {
                sql = ex.Message + " " + ex.InnerException;
            }

            return(re);
        }
Exemple #8
0
        private OrAnesthesia setOrDiagGroup(DataTable dt)
        {
            OrAnesthesia dept1 = new OrAnesthesia();

            if (dt.Rows.Count > 0)
            {
                dept1.anesthesia_id      = dt.Rows[0][oranes.anesthesia_id].ToString();
                dept1.anesthesia_code    = dt.Rows[0][oranes.anesthesia_code].ToString();
                dept1.anesthesia_code_ex = dt.Rows[0][oranes.anesthesia_code_ex].ToString();
                dept1.anesthesia_name    = dt.Rows[0][oranes.anesthesia_name].ToString();
                dept1.remark             = dt.Rows[0][oranes.remark].ToString();
                dept1.date_create        = dt.Rows[0][oranes.date_create].ToString();
                dept1.date_modi          = dt.Rows[0][oranes.date_modi].ToString();
                dept1.date_cancel        = dt.Rows[0][oranes.date_cancel].ToString();
                dept1.user_create        = dt.Rows[0][oranes.user_create].ToString();
                dept1.user_modi          = dt.Rows[0][oranes.user_modi].ToString();
                dept1.user_cancel        = dt.Rows[0][oranes.user_cancel].ToString();
                dept1.active             = dt.Rows[0][oranes.active].ToString();
                dept1.sort1 = dt.Rows[0][oranes.sort1].ToString();
            }
            else
            {
                dept1.anesthesia_id      = "";
                dept1.anesthesia_code    = "";
                dept1.anesthesia_code_ex = "";

                dept1.anesthesia_name = "";
                dept1.remark          = "";
                dept1.date_create     = "";
                dept1.date_modi       = "";
                dept1.date_cancel     = "";
                dept1.user_create     = "";
                dept1.user_modi       = "";
                dept1.user_cancel     = "";
                dept1.active          = "";
                dept1.sort1           = "";
            }

            return(dept1);
        }
Exemple #9
0
        private void initConfig()
        {
            oranes = new OrAnesthesia();
            oranes.anesthesia_id      = "anesthesia_id";
            oranes.anesthesia_code    = "anesthesia_code";
            oranes.anesthesia_code_ex = "anesthesia_code_ex";

            oranes.anesthesia_name = "anesthesia_name";
            oranes.remark          = "remark";
            oranes.date_create     = "date_create";
            oranes.date_modi       = "date_modi";
            oranes.date_cancel     = "date_cancel";
            oranes.user_create     = "user_create";
            oranes.user_modi       = "user_modi";
            oranes.user_cancel     = "user_cancel";
            oranes.active          = "active";
            oranes.sort1           = "sort1";

            oranes.table   = "or_b_anesthesia";
            oranes.pkField = "anesthesia_id";

            lDept = new List <OrAnesthesia>();
            //getlDept();
        }