Пример #1
0
    protected void BtnOK_Click(object sender, EventArgs e)
    {
        if (this.page_Code != "")
        {
            this.hdnPn.Value = this.page_Code;
        }
        this.InfoObj.PrjCode      = new Guid(this.hdnprjcode.Value);
        this.InfoObj.ScheduleName = this.TxtScheduleCode.Value;
        this.InfoObj.ScheduleCode = this.hdnTempScheduleCode.Value;
        this.InfoObj.QualityGoal  = this.TxtGoal.Text;
        this.InfoObj.Remark       = this.Txtremark.Text;
        new DatumLogic();
        int mark      = 2;
        int filesType = 0;

        if (this.cbkmark.Checked)
        {
            mark      = 3;
            filesType = int.Parse(this.DDTClass.SelectedValue.ToString());
            this.filesClass.Visible = true;
        }
        else
        {
            this.filesClass.Visible = false;
        }
        this.InfoObj.Mark      = mark;
        this.InfoObj.FilesType = filesType;
        string a;

        if ((a = this.Page_type) != null)
        {
            if (!(a == "Add"))
            {
                if (a == "Update")
                {
                    this.InfoObj.i_id = Convert.ToInt32(this.Page_Code);
                    QualityGoalAction.Update(this.InfoObj);
                }
            }
            else
            {
                new object();
                QualityGoalAction.ADD(this.InfoObj);
            }
        }
        base.RegisterScript("top.ui.tabSuccess({ parentName: '_goallist' })");
    }
Пример #2
0
    protected void Data_Bind()
    {
        string sqlWhere;

        if (this.page_PrjCode != "")
        {
            sqlWhere = "PrjCode= '" + this.page_PrjCode + "'";
        }
        else
        {
            sqlWhere = "PrjCode= '" + Guid.NewGuid() + "'";
        }
        string    viewName = QualityGoalAction.getViewName();
        DataTable pageData = publicDbOpClass.GetPageData(sqlWhere, viewName);

        this.GridView_goall.DataSource         = pageData;
        this.ViewState[GoalList.resourceTable] = pageData;
        this.GridView_goall.DataBind();
    }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack && base.Request.QueryString["Code"] != null && base.Request.QueryString["Code"].ToString() != "")
     {
         com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.DDTClass, 20, true);
         this.InfoObj = QualityGoalAction.GetModel(base.Request.QueryString["Code"].ToString());
         if (this.InfoObj != null)
         {
             this.litName.Text   = this.InfoObj.ScheduleName;
             this.litRemark.Text = this.InfoObj.Remark;
             this.litGoal.Text   = this.InfoObj.QualityGoal;
             int arg_D9_0 = this.InfoObj.Mark;
             if (this.InfoObj.Mark.ToString() != "")
             {
                 this.hdnmark.Value = this.InfoObj.Mark.ToString();
                 if (this.InfoObj.Mark == 2)
                 {
                     this.litGD.Text = "否";
                 }
                 else
                 {
                     this.litGD.Text = "是";
                 }
             }
             else
             {
                 this.litGD.Text = "否";
             }
             int arg_164_0 = this.InfoObj.FilesType;
             if (this.InfoObj.FilesType.ToString() != "" && this.InfoObj.FilesType > 0)
             {
                 this.DDTClass.SelectedValue = this.InfoObj.FilesType.ToString();
                 if (this.DDTClass.SelectedItem.Text != null && this.DDTClass.SelectedItem.Text.ToString() != "")
                 {
                     this.litType.Text = this.DDTClass.SelectedItem.Text.ToString();
                 }
             }
         }
     }
 }
Пример #4
0
    protected void BtnDelete_Click(object sender, EventArgs e)
    {
        List <string> list  = new List <string>();
        string        value = this.hiden_i_id.Value;

        if (value.Contains("["))
        {
            list = JsonHelper.GetListFromJson(value);
        }
        else
        {
            list.Add(value);
        }
        string[] inStr = list.ToArray();
        int      num   = QualityGoalAction.DEL(inStr);

        if (num >= 1)
        {
            this.JS.Text = "alert('操作成功!');";
            this.Data_Bind();
            return;
        }
        this.JS.Text = "alert('操作失败,网络连接故障,请稍候再试')";
    }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         string a;
         if ((a = this.page_type) != null)
         {
             if (!(a == "Add"))
             {
                 if (!(a == "Update"))
                 {
                     if (a == "Query")
                     {
                         this.LblHead.Text = "查看工程质量目标";
                         DataTable singleRow = QualityGoalAction.GetSingleRow(this.Page_Code);
                         if (singleRow.Rows.Count != 0)
                         {
                             this.TxtScheduleCode.Value     = singleRow.Rows[0]["TaskName"].ToString();
                             this.TxtGoal.Text              = singleRow.Rows[0]["QualityGoal"].ToString();
                             this.Txtremark.Text            = singleRow.Rows[0]["Remark"].ToString();
                             this.hdnTempScheduleCode.Value = singleRow.Rows[0]["ScheduleCode"].ToString();
                             this.hdnprjcode.Value          = singleRow.Rows[0]["prjcode"].ToString();
                             if (singleRow.Rows[0]["mark"] != null)
                             {
                                 int num = int.Parse(singleRow.Rows[0]["mark"].ToString());
                                 if (num != 2)
                                 {
                                     this.cbkmark.Checked = true;
                                     if (singleRow.Rows[0]["filesType"] != null)
                                     {
                                         this.hidenClass.Value = singleRow.Rows[0]["filesType"].ToString();
                                     }
                                 }
                                 this.hdnmark.Value = num.ToString();
                             }
                         }
                     }
                 }
                 else
                 {
                     this.LblHead.Text = "修改工程质量目标";
                     DataTable singleRow2 = QualityGoalAction.GetSingleRow(this.Page_Code);
                     if (singleRow2.Rows.Count != 0)
                     {
                         this.TxtScheduleCode.Value     = singleRow2.Rows[0]["TaskName"].ToString();
                         this.TxtGoal.Text              = singleRow2.Rows[0]["QualityGoal"].ToString();
                         this.Txtremark.Text            = singleRow2.Rows[0]["Remark"].ToString();
                         this.hdnTempScheduleCode.Value = singleRow2.Rows[0]["ScheduleCode"].ToString();
                         this.hdnprjcode.Value          = singleRow2.Rows[0]["prjcode"].ToString();
                         if (singleRow2.Rows[0]["mark"] != null && singleRow2.Rows[0]["mark"].ToString() != "")
                         {
                             int num2 = int.Parse(singleRow2.Rows[0]["mark"].ToString());
                             if (num2 != 2)
                             {
                                 this.cbkmark.Checked = true;
                                 if (singleRow2.Rows[0]["filesType"] != null && singleRow2.Rows[0]["filesType"].ToString() != "")
                                 {
                                     this.hidenClass.Value = singleRow2.Rows[0]["filesType"].ToString();
                                 }
                             }
                         }
                     }
                 }
             }
             else
             {
                 if (base.Request["PrjCode"] == "")
                 {
                     this.JS.Text = "alert('请选择项目!');window.close();";
                 }
                 this.LblHead.Text = "新增工程质量目标";
             }
         }
         this.TxtScheduleCode.Attributes["onclick"] = "javascript:pickSchedule(this);";
     }
 }