Example #1
0
    private void bind(string pk)
    {
        SuperviseInfo superviseInfo = SuperviseAction.GetSuperviseInfo(pk);

        this.TextBox_prjname.Text = superviseInfo.PrjName;
        this.TextBox_lxdw.Text    = superviseInfo.StandNapeUnit;
        this.DateBox_lxsj.Text    = superviseInfo.StandNapeDate.ToString("d").Replace("/", "-");
        this.TextBox_lxmc.Text    = superviseInfo.StandNapeName;
        this.TextBox_lxay.Text    = superviseInfo.StandItemRecord;
        switch (superviseInfo.ApproveResult)
        {
        case 0:
            this.TextBox_ldps.Text = "未通过";
            break;

        case 1:
            this.TextBox_ldps.Text = "通过";
            break;

        case 2:
            this.TextBox_ldps.Text = "未审核";
            break;
        }
        this.TextBox_jcjy.Text = superviseInfo.SuperviseAdvice;
        this.TextBox_zgcs.Text = superviseInfo.CompleteApply;
        this.DateBox_jxsj.Text = superviseInfo.KnotItemDate.ToString("d").Replace("/", "-");
        this.TextBox_jcxn.Text = superviseInfo.SuperviseEffciency;
    }
Example #2
0
        public static SuperviseInfo GetSuperviseInfo(string ID)
        {
            SuperviseInfo info  = new SuperviseInfo();
            DataTable     table = publicDbOpClass.DataTableQuary("select * from Prj_V_ItemSupervise where ID=" + ID);

            info.StandNapeUnit = table.Rows[0]["StandNapeUnit"].ToString();
            if (table.Rows[0]["StandNapeDate"].ToString() != "")
            {
                info.StandNapeDate = DateTime.Parse(table.Rows[0]["StandNapeDate"].ToString());
            }
            info.StandNapeName   = table.Rows[0]["StandNapeName"].ToString();
            info.StandItemRecord = table.Rows[0]["StandItemRecord"].ToString();
            info.SuperviseAdvice = table.Rows[0]["SuperviseAdvice"].ToString();
            info.CompleteApply   = table.Rows[0]["CompleteApply"].ToString();
            if (table.Rows[0]["KnotItemDate"].ToString() != "")
            {
                info.KnotItemDate = DateTime.Parse(table.Rows[0]["KnotItemDate"].ToString());
            }
            info.SuperviseEffciency = table.Rows[0]["SuperviseEffciency"].ToString();
            info.ApprovePerson      = table.Rows[0]["ApprovePerson"].ToString();
            info.ApproveResult      = int.Parse(table.Rows[0]["ApproveResult"].ToString());
            if (table.Rows[0]["ApproveDate"].ToString() != "")
            {
                info.ApproveDate = DateTime.Parse(table.Rows[0]["ApproveDate"].ToString());
            }
            info.ApproveIdea = table.Rows[0]["ApproveIdea"].ToString();
            info.PrjName     = table.Rows[0]["PrjName"].ToString();
            return(info);
        }
Example #3
0
    protected void Button_save_Click(object sender, EventArgs e)
    {
        SuperviseInfo superviseInfo = new SuperviseInfo();

        if (base.Request["pk"] != null)
        {
            superviseInfo.ID = int.Parse(base.Request["pk"].ToString());
        }
        superviseInfo.ApproveDate   = DateTime.Parse(this.DateBox_sprq.Text);
        superviseInfo.ApproveIdea   = this.TextBox_spyj.Text;
        superviseInfo.ApprovePerson = this.TextBox_spr.Text;
        if (this.RadioButton_ok.Checked)
        {
            superviseInfo.ApproveResult = 1;
        }
        else
        {
            superviseInfo.ApproveResult = -1;
        }
        bool flag = SuperviseAction.SuperviseInfoOp(superviseInfo, "Sp");

        if (flag)
        {
            base.RegisterScript(" top.ui.tabSuccess({ parentName: '_superviselist' });");
            return;
        }
        base.RegisterScript("top.ui.alert('保存失败!');");
    }
Example #4
0
    protected void Button_save_Click(object sender, EventArgs e)
    {
        if (this.TextBox_jcjy.Text.Length > this.TextBox_jcjy.MaxLength)
        {
            this.JavaScriptControl1.Text = "alert('监察建议输入过长!');";
            return;
        }
        if (this.TextBox_zgcs.Text.Length > this.TextBox_zgcs.MaxLength)
        {
            this.JavaScriptControl1.Text = "alert('整改措施及效果输入过长!');";
            return;
        }
        SuperviseInfo superviseInfo = new SuperviseInfo();

        if (base.Request["pk"] != null)
        {
            superviseInfo.ID = int.Parse(base.Request["pk"].ToString());
        }
        superviseInfo.ApproveResult      = 0;
        superviseInfo.StandNapeUnit      = this.TextBox_lxdw.Text;
        superviseInfo.StandNapeDate      = DateTime.Parse(this.DateBox_lxsj.Text);
        superviseInfo.StandNapeName      = this.TextBox_lxmc.Text;
        superviseInfo.StandItemRecord    = this.TextBox_lxay.Text;
        superviseInfo.SuperviseAdvice    = this.TextBox_jcjy.Text;
        superviseInfo.CompleteApply      = this.TextBox_zgcs.Text;
        superviseInfo.KnotItemDate       = DateTime.Parse(this.DateBox_jxsj.Text);
        superviseInfo.SuperviseEffciency = this.TextBox_jcxn.Text;
        if (base.Request["Prjcode"] != null)
        {
            superviseInfo.PrjCode = base.Request["Prjcode"].ToString();
        }
        bool flag;

        if (base.Request["pk"] == null)
        {
            flag = SuperviseAction.SuperviseInfoOp(superviseInfo, "Insert");
        }
        else
        {
            flag = SuperviseAction.SuperviseInfoOp(superviseInfo, "Update");
        }
        if (flag)
        {
            base.RegisterScript(" top.ui.tabSuccess({ parentName: '_superviselist' });");
            return;
        }
        base.RegisterScript("top.ui.alert('保存失败!');");
    }
Example #5
0
    private void bind(string pk)
    {
        SuperviseInfo superviseInfo = SuperviseAction.GetSuperviseInfo(pk);

        this.DateBox_sprq.Text = ((superviseInfo.ApproveDate.ToString("d") == "0001/1/1") ? DateTime.Now.ToString("d") : superviseInfo.ApproveDate.ToString("d"));
        this.TextBox_spyj.Text = superviseInfo.ApproveIdea;
        this.TextBox_spr.Text  = superviseInfo.ApprovePerson;
        if (superviseInfo.ApproveResult == 1)
        {
            this.RadioButton_ok.Checked = true;
            return;
        }
        if (superviseInfo.ApproveResult == 0)
        {
            this.RadioButton_no.Checked = true;
        }
    }
Example #6
0
        public static bool SuperviseInfoOp(SuperviseInfo objinfo, string OpType)
        {
            string sqlString = "";

            if (OpType == "Insert")
            {
                sqlString = string.Concat(new object[] {
                    "Insert into Prj_ItemSupervise(PrjCode,StandNapeUnit,StandNapeDate,StandNapeName,StandItemRecord,SuperviseAdvice,CompleteApply,KnotItemDate,SuperviseEffciency,ApproveResult) values('", objinfo.PrjCode, "','", objinfo.StandNapeUnit, "','", objinfo.StandNapeDate, "','", objinfo.StandNapeName, "','", objinfo.StandItemRecord, "','", objinfo.SuperviseAdvice, "','", objinfo.CompleteApply, "','", objinfo.KnotItemDate,
                    "','", objinfo.SuperviseEffciency, "',", objinfo.ApproveResult.ToString(), ")"
                });
            }
            else if (OpType == "Update")
            {
                sqlString = string.Concat(new object[] {
                    "update Prj_ItemSupervise set StandNapeUnit='", objinfo.StandNapeUnit, "',StandNapeDate='", objinfo.StandNapeDate, "',StandNapeName='", objinfo.StandNapeName, "',StandItemRecord='", objinfo.StandItemRecord, "',SuperviseAdvice='", objinfo.SuperviseAdvice, "',CompleteApply='", objinfo.CompleteApply, "',KnotItemDate='", objinfo.KnotItemDate, "',SuperviseEffciency='", objinfo.SuperviseEffciency,
                    "' where ID=", objinfo.ID
                });
            }
            else if (OpType == "Sp")
            {
                sqlString = string.Concat(new object[] { "update Prj_ItemSupervise set ApprovePerson='", objinfo.ApprovePerson, "',ApproveResult=", objinfo.ApproveResult, ",ApproveDate='", objinfo.ApproveDate, "',ApproveIdea='", objinfo.ApproveIdea, "' where ID=", objinfo.ID });
            }
            return(publicDbOpClass.NonQuerySqlString(sqlString));
        }