示例#1
0
 public bool Delete(string rdn)
 {
     try
     {
         string     sql  = "delete from dbo.JCI_patient_brifeInfo where rdn = " + rdn;
         SqlConnect conn = new SqlConnect();
         conn.ExcuteCmd(sql);
         sql = "delete from dbo.JCI_detailInfo where typefrom='" + this.tableType + "' and applyRdn = " + rdn;
         conn.ExcuteCmd(sql);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(true);
 }
示例#2
0
    public bool ChangePsw(UserPower user, string newPsw)
    {
        SqlConnect conn = new SqlConnect();
        string     sql  = "update dbo.JCI_newEmp set psw='" + newPsw + "' where empId='" + user.UserId + "' and deptNum='" + user.UserDept + "'";

        conn.ExcuteCmd(sql);
        return(true);
    }
示例#3
0
    public void saveMediTable(GridView gv, string index)
    {
        try
        {
            int        i;
            SqlConnect conn = new SqlConnect();
            System.Text.StringBuilder sql = new System.Text.StringBuilder();
            #region 遍历
            for (i = 0; i < gv.Rows.Count; i++)
            {
                sql.Remove(0, sql.Length);
                sql.Append("insert into JCI_detailInfo([applyRdn],[largeItemRdn],[smallItemRdn],[result],[largeItemName],[smallItemName],[typefrom])");
                sql.Append("values(" + index);

                CheckBox          cb  = null;                         //控件类型
                Label             lab = null;
                ControlCollection ccs = gv.Rows[i].Cells[1].Controls; //控件位置
                foreach (Control c in ccs)                            //遍历控件
                {
                    cb = c as CheckBox;
                    if (cb == null)
                    {
                        continue;            //出错
                    }
                    string[] rdns = cb.ID.Split('_');
                    //string[] rdns=new string[2];
                    //rdns[0] = "1"; rdns[0] = "1";
                    sql.Append("," + rdns[0] + "," + rdns[1]);
                    if (cb.Checked)
                    {
                        sql.Append(",'" + cb.Text + "'");
                    }
                    else
                    {
                        sql.Append(",'0'");
                    }
                }
                ccs = gv.Rows[i].Cells[0].Controls;
                foreach (Control c in ccs)//遍历控件 cell[0]
                {
                    lab = c as Label;
                    if (lab != null)
                    {
                        sql.Append(",'" + lab.Text + "'");
                    }
                }
                sql.Append(",'" + this.tableType + "'");
                sql.Append(")");
                conn.ExcuteCmd(sql.ToString());
            }
            #endregion
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
示例#4
0
    public bool accept(string reportId, string passPerson, string passDate)
    {
        bool Succ = false;

        try
        {
            string     sql  = "update dbo.JCI_acc_brifeInfo set passPerson='" + passPerson + "',passDate='" + passDate + "',isPassed='1' where reportId=" + reportId;
            SqlConnect conn = new SqlConnect();
            if (conn.ExcuteCmd(sql) > 0)
            {
                Succ = true;
            }
        }
        catch (Exception ex)
        {
            throw;
        }
        return(Succ);
    }
示例#5
0
    private void saveDetailInfo(string rdn, GridView gv)
    {
        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        try
        {
            int        i;
            SqlConnect conn = new SqlConnect();

            #region 遍历
            for (i = 0; i < gv.Rows.Count; i++)
            {
                sql.Remove(0, sql.Length);
                sql.Append("insert into JCI_detailInfo([applyRdn],[largeItemRdn],[smallItemRdn],[result],[largeItemName],[smallItemName],[typefrom],[sortId])");
                sql.Append("values(" + rdn + ",");

                ControlCollection ccs = gv.Rows[i].Cells[0].Controls;//控件位置
                Label             ll1 = ccs[1] as Label;
                Label             ll2 = ccs[5] as Label;
                RadioButtonList   rbl = ccs[7] as RadioButtonList;
                HiddenField       hf1 = ccs[9] as HiddenField;
                HiddenField       hf2 = ccs[11] as HiddenField;
                HiddenField       hf3 = ccs[13] as HiddenField;
                if (ll1 != null && ll2 != null && rbl != null)
                {
                    sql.Append(hf1.Value + "," + hf2.Value);
                    sql.Append(",'" + rbl.SelectedValue + "','" + ll1.Text + "','" + ll2.Text + "'");
                }
                sql.Append(",'" + this.tableType + "'");
                sql.Append("," + hf3.Value);
                sql.Append(")");
                conn.ExcuteCmd(sql.ToString());
            }
            #endregion
        }
        catch (Exception ex)
        {
            throw;
        }
    }