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
    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 #3
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 #4
0
    protected void Button_del_Click(object sender, EventArgs e)
    {
        if (this.TextBox_pk.Text.Trim() == "")
        {
            this.JavaScriptControl1.Text = "alert('请选择删除的记录!')";
            return;
        }
        bool flag = SuperviseAction.Delete(this.TextBox_pk.Text);

        if (flag)
        {
            this.JavaScriptControl1.Text = "alert('删除成功!');window.location.href=window.location.href";
            return;
        }
        this.JavaScriptControl1.Text = "alert('删除失败!')";
    }
Example #5
0
    protected void Button_query_Click(object sender, EventArgs e)
    {
        if (base.Request["PrjCode"] == null)
        {
            this.DataGrid1.DataSource = "";
            this.DataGrid1.DataBind();
            return;
        }
        string text = "prjcode='" + base.Request["PrjCode"].ToString() + "'";

        if (this.TextBox_lxdw.Text != "")
        {
            text = text + " and StandNapeUnit like '%" + this.TextBox_lxdw.Text + "%'";
        }
        this.DataGrid1.DataSource = SuperviseAction.GetSuperviseCollections(text);
        this.DataGrid1.DataBind();
    }
Example #6
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 #7
0
 private void bind()
 {
     if (base.Request["PrjCode"] != null)
     {
         string text = "prjcode='" + base.Request["PrjCode"].ToString() + "'";
         if (base.Request["Type"] == "List")
         {
             text += " and ApproveResult=1";
         }
         this.DataGrid1.DataSource = SuperviseAction.GetSuperviseCollections(text);
         this.DataGrid1.DataBind();
         return;
     }
     if (base.Request["Type"] == "ShenHe")
     {
         string strwhere = "ApproveResult=2";
         this.DataGrid1.DataSource = SuperviseAction.GetSuperviseCollections(strwhere);
         this.DataGrid1.DataBind();
         return;
     }
     this.DataGrid1.DataSource = "";
     this.DataGrid1.DataBind();
 }