コード例 #1
0
ファイル: EquipmentAction.cs プロジェクト: zxl881203/src
        private string GetSynchronizeEquipmentPlanDetailString(string PlanCode, ArrayList al)
        {
            string str = "";
            EquipmentPlanDetailInfo info = new EquipmentPlanDetailInfo();

            for (int i = 0; i < al.Count; i++)
            {
                info = (EquipmentPlanDetailInfo)al[i];
                object obj2 = str + " insert into Ent_Ept_PlanDetail(PlanCode, EquipmentCode, EquipmentType, EquipmentCount,  Remark) ";
                str = string.Concat(new object[] { obj2, " values('", PlanCode, "','", info.EquipmentCode, "', 0, ", info.EquipmentCount, ",'", info.Remark, "') " });
            }
            return(str);
        }
コード例 #2
0
    private void Plan_add()
    {
        DataTable dataTable = new DataTable();

        this.Session["yhdm"].ToString();
        dataTable = EquipmentAction.getEquPlanTempRes(new Guid(this._strGuid), this.Session["yhdm"].ToString(), this.txtPlanCode.Text.Trim());
        ArrayList arrayList = new ArrayList();
        EquipmentPlanDetailInfo equipmentPlanDetailInfo = new EquipmentPlanDetailInfo();

        for (int i = 0; i < dataTable.Rows.Count; i++)
        {
            arrayList.Add(new EquipmentPlanDetailInfo
            {
                EquipmentCode  = dataTable.Rows[i]["ResourceCode"].ToString(),
                EquipmentName  = dataTable.Rows[i]["ResourceName"].ToString(),
                EquipmentCount = Convert.ToDecimal(dataTable.Rows[i]["EquipmentCount"].ToString()),
                Remark         = dataTable.Rows[i]["Remark"].ToString()
            });
        }
        this.BindDataGrid(arrayList);
    }