Пример #1
0
    private TechnologyStandardCollectin GetSelect()
    {
        TechnologyStandardCollectin technologyStandardCollectin = new TechnologyStandardCollectin();
        ArrayList arrayList = new ArrayList();
        int       maxId     = TechnologyStandardAction.GetMaxId();

        for (int i = 0; i < this.DGrdStandard.Items.Count; i++)
        {
            System.Web.UI.WebControls.DataGridItem dataGridItem = this.DGrdStandard.Items[i];
            System.Web.UI.WebControls.CheckBox     checkBox     = (System.Web.UI.WebControls.CheckBox)dataGridItem.Cells[6].FindControl("CHK");
            if (checkBox.Checked)
            {
                TechnologyStandardInfo technologyStandardInfo = new TechnologyStandardInfo();
                technologyStandardInfo.TechnologyCriterion = int.Parse(this.DGrdStandard.DataKeys[i].ToString());
                technologyStandardInfo.MainId  = maxId + i;
                technologyStandardInfo.PrjCode = this.ViewState["PRJCODE"].ToString();
                technologyStandardInfo.TechnologyCriterionID    = dataGridItem.Cells[1].Text.ToString();
                technologyStandardInfo.TechnologyClassify       = dataGridItem.Cells[4].Text.ToString();
                technologyStandardInfo.TechnologyName           = dataGridItem.Cells[3].Text.ToString();
                technologyStandardInfo.TechnologyPromulgateTime = dataGridItem.Cells[2].Text.ToString();
                technologyStandardInfo.Remark = dataGridItem.Cells[5].Text.ToString();
                technologyStandardCollectin.Add(technologyStandardInfo);
                arrayList.Add(technologyStandardInfo.MainId);
            }
        }
        this.ViewState["list"] = arrayList;
        return(technologyStandardCollectin);
    }
Пример #2
0
        public static int TechStandardSelect(TechnologyStandardCollectin objColl)
        {
            string str = "";

            str = " begin ";
            foreach (TechnologyStandardInfo info in objColl)
            {
                str = str + " insert into Prj_TechnologyCriterion (MainID,PrjCode,TechnologyCriterionID,TechnologyClassify,";
                str = str + "TechnologyName,TechnologyPromulgateTime,Remark,MainKey) values('";
                object obj2 = str;
                str = string.Concat(new object[] { obj2, info.MainId, "','", info.PrjCode, "','", info.TechnologyCriterionID, "','", info.TechnologyClassify, "','" });
                string str2 = str;
                str = str2 + info.TechnologyName + "','" + info.TechnologyPromulgateTime + "','" + info.Remark + "'," + info.TechnologyCriterion.ToString() + ")";
            }
            return(publicDbOpClass.ExecSqlString(str + " end "));
        }
Пример #3
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        TechnologyStandardCollectin select = this.GetSelect();

        if (select.Count < 1)
        {
            return;
        }
        TechnologyStandardAction.TechStandardSelect(select);
        ConstructOrganizeBBl constructOrganizeBBl = new ConstructOrganizeBBl();

        if (this.ViewState["list"] != null)
        {
            ArrayList arrayList = this.ViewState["list"] as ArrayList;
            for (int i = 0; i < arrayList.Count; i++)
            {
                constructOrganizeBBl.UpdGuidang("Prj_TechnologyCriterion", 2, 1, " where MainId=" + arrayList[i].ToString());
            }
        }
        this.Js.Text = "window.close();";
    }