예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["CMD_WH_AREA_ID"] != null)
            {
                dtArea = bll.FillDataTable("Cmd.SelectArea", new DataParameter[] { new DataParameter("{0}", "AreaCode='" + Request.QueryString["CMD_WH_AREA_ID"] + "'") });
                if (this.dtArea.Rows.Count > 0)
                {
                    this.txtWHID.Text     = dtArea.Rows[0]["WarehouseCode"].ToString();
                    this.txtAreaID.Text   = dtArea.Rows[0]["AreaCode"].ToString();
                    this.txtWhName.Text   = bll.GetFieldValue("CMD_Warehouse", "WarehouseName", "WarehouseCode='" + this.txtWHID.Text + "'");
                    this.txtAreaCode.Text = dtArea.Rows[0]["AreaCode"].ToString();
                    this.txtAreaName.Text = dtArea.Rows[0]["AreaName"].ToString();
                    this.txtMemo.Text     = dtArea.Rows[0]["MEMO"].ToString();
                }
            }
            else if (Request.QueryString["WHCODE"] != null)
            {
                this.txtWHID.Text = Request.QueryString["WHCODE"];

                this.txtWhName.Text   = bll.GetFieldValue("CMD_Warehouse", "WarehouseName", "WarehouseCode='" + this.txtWHID.Text + "'");
                this.txtAreaID.Text   = "";
                this.txtAreaCode.Text = bll.GetNewID("CMD_Area", "AreaCode", "1=1");
            }
            SetTextReadOnly(this.txtAreaCode, this.txtWhName, this.txtWHID);
        }
        else
        {
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindDropDownList();
            if (Request.QueryString["CMD_CELL_ID"] != null)
            {
                dtCell = bll.FillDataTable("Cmd.SelectCell", new DataParameter[] { new DataParameter("{0}", "CellCode='" + Request.QueryString["CMD_CELL_ID"] + "'") });
                this.txtCELLID.Text  = dtCell.Rows[0]["CellCode"].ToString();
                this.txtShelfID.Text = dtCell.Rows[0]["ShelfCode"].ToString();
                this.txtAreaID.Text  = dtCell.Rows[0]["AreaCode"].ToString();

                this.txtShelfName.Text    = bll.GetFieldValue("CMD_Shelf", "ShelfName", "ShelfCode='" + this.txtShelfID.Text + "'");
                ddlAreaCode.SelectedValue = this.txtAreaID.Text;

                this.txtCellCode.Text        = dtCell.Rows[0]["CellCode"].ToString();
                this.txtCellName.Text        = dtCell.Rows[0]["CellName"].ToString();
                this.ddlActive.SelectedValue = dtCell.Rows[0]["IsActive"].ToString();

                this.txtCellRows.Text      = dtCell.Rows[0]["CellRow"].ToString();
                this.txtCellCols.Text      = dtCell.Rows[0]["CellColumn"].ToString();
                this.ddlLock.SelectedValue = dtCell.Rows[0]["IsLock"].ToString();

                this.txtMemo.Text = dtCell.Rows[0]["MEMO"].ToString();


                int count = bll.GetRowCount("View_CMD_CELL_ALL", "CellCode='" + this.txtCELLID.Text + "' and PalletCode!=''");
                if (count > 0)
                {
                    this.btnSave.Enabled = false;
                }
            }
            else if (Request.QueryString["SHELFCODE"] != null)
            {
                this.txtShelfID.Text = Request.QueryString["SHELFCODE"];
                this.txtAreaID.Text  = bll.GetFieldValue("CMD_Shelf", "AreaCode", "ShelfCode='" + this.txtShelfID.Text + "'");

                this.txtShelfName.Text         = bll.GetFieldValue("CMD_Shelf", "ShelfName", "ShelfCode='" + this.txtShelfID.Text + "'");
                this.ddlAreaCode.SelectedValue = this.txtAreaID.Text;

                int RowCount = bll.GetRowCount("CMD_WH_CELL", string.Format("SHELF_CODE='{0}'", Request.QueryString["SHELFCODE"])) + 1;
                this.txtCellCode.Text = Request.QueryString["SHELFCODE"] + RowCount.ToString().PadLeft(3, '0');
                this.txtCellCols.Text = RowCount.ToString();
                this.txtCELLID.Text   = "";
                //this.txtEGroup.Text = "0";
                //this.txtECom.Text = "0";
                //this.txtEAddress.Text = "0";
            }
            SetTextReadOnly(this.txtCellName, this.txtCellCode, this.txtShelfName, this.txtCellCols, this.txtCellRows);
        }
        else
        {
        }
    }
예제 #3
0
    protected void btnCheck_Click(object sender, EventArgs e)
    {
        DataParameter[] paras = new DataParameter[4];
        if (this.btnCheck.Text == "审核")
        {
            paras[0] = new DataParameter("@Checker", Session["EmployeeCode"].ToString());
            paras[1] = new DataParameter("{0}", "getdate()");
            paras[2] = new DataParameter("@State", 1);
        }
        else
        {
            int State = int.Parse(bll.GetFieldValue("WMS_BillMaster", "State", string.Format("BillID='{0}'", this.txtID.Text)));
            if (State > 1)
            {
                JScript.Instance.ShowMessage(this.updatePanel, this.txtID.Text + " 单号已经作业,不能进行反审。");
                return;
            }

            paras[0] = new DataParameter("@Checker", "");
            paras[1] = new DataParameter("{0}", "null");
            paras[2] = new DataParameter("@State", 0);
        }
        paras[3] = new DataParameter("@BillID", this.txtID.Text);


        bll.ExecNonQuery("WMS.UpdateCheckBillMaster", paras);
        AddOperateLog("入库单 ", btnCheck.Text + " " + txtID.Text);

        DataTable dt = bll.FillDataTable("WMS.SelectBillMaster", new DataParameter[] { new DataParameter("{0}", string.Format("BillID='{0}'", strID)) });

        BindData(dt);
    }
예제 #4
0
    protected void btnUnTask_Click(object sender, EventArgs e)
    {
        BLL.BLLBase bll   = new BLL.BLLBase();
        int         State = int.Parse(bll.GetFieldValue("WMS_BillMaster", "State", string.Format("BillID='{0}'", this.txtID.Text)));

        if (State < 2)
        {
            JScript.ShowMessage(this.updatePanel, this.txtID.Text + "单号还未作业,不能进行取消作业。");
            return;
        }
        if (State > 2)
        {
            JScript.ShowMessage(this.updatePanel, this.txtID.Text + "单号已经执行,不能再进行取消作业。");
            return;
        }
        try
        {
            bll.ExecNonQueryTran("WMS.SpCancelOutStockTask", new DataParameter[] { new DataParameter("@BillID", strID), new DataParameter("@UserName", Session["EmployeeCode"].ToString()) });
            AddOperateLog("入库单", "入库取消作业单号:" + this.txtID.Text);
            DataTable dt = bll.FillDataTable("WMS.SelectBillMaster", new DataParameter[] { new DataParameter("{0}", string.Format("BillID='{0}'", strID)) });
            BindData(dt);
        }
        catch (Exception ex)
        {
            JScript.ShowMessage(this.updatePanel, ex.Message);
        }
    }
예제 #5
0
    protected void btnCheck_Click(object sender, EventArgs e)
    {
        List <string> Comd = new List <string>();

        Comd.Insert(0, "WMS.UpdateMoveCellLock");
        Comd.Insert(1, "WMS.UpdateCellLock");
        Comd.Insert(2, "WMS.UpdateCheckBillMaster");
        List <DataParameter[]> paras = new List <DataParameter[]>();

        if (this.btnCheck.Text == "审核")
        {
            DataTable dtSub = (DataTable)ViewState[FormID + "_View_dgViewSub1"];
            for (int i = 0; i < dtSub.Rows.Count; i++)
            {
                int count = 0;
                count = bll.GetRowCount("Cmd_Cell", string.Format("CellCode='{0}' and (IsLock=1 or ProductCode!='{1}')", dtSub.Rows[i]["CellCode"], dtSub.Rows[i]["ProductCode"]));
                if (count > 0)
                {
                    JScript.ShowMessage(this.updatePanel, "货位 " + dtSub.Rows[i]["CellCode"].ToString() + "已经被其它单据锁定,不能移库!");
                    return;
                }
                count = bll.GetRowCount("Cmd_Cell", string.Format("CellCode='{0}' and (IsLock=1 or IsActive=0)", dtSub.Rows[i]["NewCellCode"]));
                if (count > 0)
                {
                    JScript.ShowMessage(this.updatePanel, "货位 " + dtSub.Rows[i]["NewCellCode"].ToString() + "已经被其它单据锁定,不能移库!");
                    return;
                }
            }
            paras.Insert(0, new DataParameter[] { new DataParameter("@Lock", 1), new DataParameter("{0}", string.Format("BillID='{0}'", this.txtID.Text.Trim())) });
            paras.Insert(1, new DataParameter[] { new DataParameter("@Lock", 1), new DataParameter("{0}", string.Format("BillID='{0}'", this.txtID.Text.Trim())) });

            paras.Insert(2, new DataParameter[] { new DataParameter("@Checker", Session["EmployeeCode"].ToString()), new DataParameter("{0}", "getdate()"),
                                                  new DataParameter("@State", 1), new DataParameter("@BillID", this.txtID.Text) });
        }
        else
        {
            int State = int.Parse(bll.GetFieldValue("WMS_BillMaster", "State", string.Format("BillID='{0}'", this.txtID.Text)));
            if (State > 1)
            {
                JScript.ShowMessage(this.updatePanel, this.txtID.Text + " 单号已经作业,不能进行反审。");
                return;
            }
            paras.Insert(0, new DataParameter[] { new DataParameter("@Lock", 0), new DataParameter("{0}", string.Format("BillID='{0}'", this.txtID.Text.Trim())) });
            paras.Insert(1, new DataParameter[] { new DataParameter("@Lock", 0), new DataParameter("{0}", string.Format("BillID='{0}'", this.txtID.Text.Trim())) });
            paras.Insert(2, new DataParameter[] { new DataParameter("@Checker", ""), new DataParameter("{0}", "null"),
                                                  new DataParameter("@State", 0), new DataParameter("@BillID", this.txtID.Text) });
        }

        bll.ExecTran(Comd.ToArray(), paras);

        AddOperateLog("移库单 ", btnCheck.Text + " " + txtID.Text);

        DataTable dt = bll.FillDataTable("WMS.SelectBillMaster", new DataParameter[] { new DataParameter("{0}", string.Format("BillID='{0}'", strID)) });

        BindData(dt);
    }
예제 #6
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string strColorCode = "'-1',";
        BLL.BLLBase bll = new BLL.BLLBase();
        for (int i = 0; i < this.GridView1.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)(this.GridView1.Rows[i].FindControl("cbSelect"));
            if (cb != null && cb.Checked)
            {
                string hk = this.GridView1.Rows[i].Cells[1].Text;
                //判断能否删除
                int State = int.Parse(bll.GetFieldValue("WMS_BillMaster", "State", string.Format("BillID='{0}'", hk)));
                if (State == 0)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, GridView1.Rows[i].Cells[2].Text + "单号还未审核不能作业,请审核后,再进行盘库作业。");
                    BindDataSub(this.hdnRowValue.Value);
                    return;
                }
                if (State > 1)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, GridView1.Rows[i].Cells[2].Text + "单号已经作业,不能再进行盘库作业。");
                    BindDataSub(this.hdnRowValue.Value);
                    return;
                }

                strColorCode += "'" + hk + "',";
            }
        }

        strColorCode += "'-1'";
        if (strColorCode.Replace("'-1','-1'", "").Trim().Length == 0)
        {
            JScript.Instance.ShowMessage(this.UpdatePanel1, "请选择单据!");
            SetGridViewEmptyRow(GridView1, (DataTable)ViewState[FormID + "_MainFormData"]);
            BindDataSub(this.hdnRowValue.Value);
            return;
        }
        try
        {

            bll.ExecNonQueryTran("WMS.SpInventoryStockTask", new DataParameter[] { new DataParameter("@strWhere", strColorCode), new DataParameter("@UserName", Session["EmployeeCode"].ToString()) });

            AddOperateLog("盘库单", "盘库作业单号:" + strColorCode.Replace("'-1',", "").Replace(",'-1'", ""));
            DataTable dt = SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, GridView1, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
            SetBindDataSub(dt);
        }
        catch (Exception ex)
        {
            BindDataSub(this.hdnRowValue.Value);
            JScript.Instance.ShowMessage(this.UpdatePanel1, ex.Message);

        }
    }
예제 #7
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string strColorCode = "'-1',";

        BLL.BLLBase bll = new BLL.BLLBase();
        for (int i = 0; i < this.GridView1.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)(this.GridView1.Rows[i].FindControl("cbSelect"));
            if (cb != null && cb.Checked)
            {
                string hk = this.GridView1.Rows[i].Cells[1].Text;
                //判断能否删除
                int State = int.Parse(bll.GetFieldValue("WMS_BillMaster", "State", string.Format("BillID='{0}'", hk)));
                if (State == 0)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, GridView1.Rows[i].Cells[2].Text + "单号还未审核不能作业,请审核后,再进行入库作业。");
                    BindDataSub(this.hdnRowValue.Value);
                    return;
                }
                if (State > 1)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, GridView1.Rows[i].Cells[2].Text + "单号已经作业,不能再进行入库作业。");
                    BindDataSub(this.hdnRowValue.Value);
                    return;
                }

                strColorCode += "'" + hk + "',";
            }
        }

        strColorCode += "'-1'";
        if (strColorCode.Replace("'-1','-1'", "").Trim().Length == 0)
        {
            JScript.Instance.ShowMessage(this.UpdatePanel1, "请选择单据!");
            SetGridViewEmptyRow(GridView1, (DataTable)ViewState[FormID + "_MainFormData"]);
            BindDataSub(this.hdnRowValue.Value);
            return;
        }
        try
        {
            bll.ExecNonQueryTran("WMS.SpInstockTask", new DataParameter[] { new DataParameter("@strWhere", strColorCode), new DataParameter("@UserName", Session["EmployeeCode"].ToString()) });

            AddOperateLog("入库单", "入库作业单号:" + strColorCode.Replace("'-1',", "").Replace(",'-1'", ""));
            DataTable dt = SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, GridView1, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
            SetBindDataSub(dt);
        }
        catch (Exception ex)
        {
            BindDataSub(this.hdnRowValue.Value);
            JScript.Instance.ShowMessage(this.UpdatePanel1, ex.Message);
        }
    }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["CMD_WH_SHELF_ID"] != null)
            {
                dtShelf = bll.FillDataTable("Cmd.SelectCellShelf", new DataParameter[] { new DataParameter("{0}", " ShelfCode='" + Request.QueryString["CMD_WH_SHELF_ID"] + "'") });

                this.txtShelfID.Text = dtShelf.Rows[0]["ShelfCode"].ToString();

                this.txtWHID.Text   = dtShelf.Rows[0]["WarehouseCode"].ToString();
                this.txtWhName.Text = bll.GetFieldValue("CMD_Warehouse", "WarehouseName", "WarehouseCode='" + this.txtWHID.Text + "'");
                this.txtAreaID.Text = dtShelf.Rows[0]["AreaCode"].ToString();

                this.txtShelfCode.Text = dtShelf.Rows[0]["ShelfCode"].ToString();
                this.txtShelfName.Text = dtShelf.Rows[0]["ShelfName"].ToString();
                this.txtCellRows.Text  = dtShelf.Rows[0]["Rows"].ToString();
                this.txtCellCols.Text  = dtShelf.Rows[0]["Columns"].ToString();

                this.txtMemo.Text            = dtShelf.Rows[0]["MEMO"].ToString();
                this.ddlActive.SelectedValue = dtShelf.Rows[0]["IsActive"].ToString();
            }
            else if (Request.QueryString["AREACODE"] != null)
            {
                this.txtAreaID.Text = Request.QueryString["AREACODE"];
                this.txtWHID.Text   = bll.GetFieldValue("CMD_Area", "WarehouseCode", "AreaCode='" + this.txtAreaID.Text + "'");
                this.txtWhName.Text = bll.GetFieldValue("CMD_Warehouse", "WarehouseName", "WarehouseCode='" + this.txtWHID.Text + "'");

                this.txtShelfID.Text = "";

                int RowCount = bll.GetRowCount("CMD_WH_SHELF", string.Format("AREA_CODE='{0}'", Request.QueryString["AREACODE"])) + 1;
                this.txtShelfCode.Text = Request.QueryString["AREACODE"] + RowCount.ToString().PadLeft(3, '0');
            }
            SetTextReadOnly(txtShelfCode, this.txtWhName, this.txtCellCols, this.txtCellRows);
        }
    }
예제 #9
0
 private void BindDropDownList()
 {
     this.txtProductCode.Text = strID;
     this.txtProductName.Text = bll.GetFieldValue("CMD_Product", "ProductName", "ProductCode='" + strID + "'");
     this.hdnArea.Value       = bll.GetFieldValue("CMD_Product", "AreaCode", "ProductCode='" + strID + "'");
 }
예제 #10
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_Product", string.Format("ProductCode='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.ShowMessage(this.Page, "该产品编号已经存在!");
                return;
            }

            //判断车型,轮对轴号 是否重复

            //Count=bll.GetRowCount("CMD_Product", string.Format("ProductCode='{0}'", this.txtID.Text));
            //if (Count > 0)
            //{
            //    WMS.App_Code.JScript.ShowMessage(this.Page, "该产品编号已经存在!");
            //    return;
            //}
            //, , , , , , , , , ,
            //      , , , , , , , , , , ,
            //      , , , , Creator, CreateDate, Updater, UpdateDate, ,



            bll.ExecNonQuery("Cmd.InsertProduct", new DataParameter[] {
                new DataParameter("@ProductCode", this.txtID.Text.Trim()),
                new DataParameter("@ProductName", this.txtProductName.Text.Trim()),
                new DataParameter("@CategoryCode", this.ddlCategoryCode.SelectedValue),
                new DataParameter("@ProductEName", this.txtProductEName.Text),
                new DataParameter("@FactoryID", this.ddlFactory.SelectedValue),
                new DataParameter("@ModelNo", this.txtModelNo.Text.Trim()),
                new DataParameter("@Spec", this.txtSpec.Text.Trim()),
                new DataParameter("@Barcode", this.txtBarcode.Text.Trim()),
                new DataParameter("@Propertity", this.txtPropertity.Text.Trim()),
                new DataParameter("@Unit", this.txtUnit.Text.Trim()),
                new DataParameter("@Length", this.txtLength.Text.Trim()),
                new DataParameter("@Width", this.txtWidth.Text.Trim()),
                new DataParameter("@Height", this.txtHeight.Text.Trim()),
                new DataParameter("@Material", this.txtMaterial.Text.Trim()),
                new DataParameter("@Weight", this.txtWeight.Text.Trim()),
                new DataParameter("@Color", this.txtColor.Text.Trim()),
                new DataParameter("@StandardNo", this.txtStandardNo.Text.Trim()),
                new DataParameter("@PartNo", this.txtPartNo.Text.Trim()),
                new DataParameter("@ValidPeriod", this.txtValidPeriod.Text.Trim()),
                new DataParameter("@Description", this.txtDescription.Text.Trim()),
                new DataParameter("@AreaCode", bll.GetFieldValue("CMD_ProductCategory", "AreaCode", "CategoryCode='" + this.ddlCategoryCode.SelectedValue + "'")),
                new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
            });
        }
        else //修改
        {
            //判断车型,轮对轴号 是否重复
            //int Count = bll.GetRowCount("CMD_Product", string.Format("ProductCode='{0}'", this.txtID.Text));
            //if (Count > 0)
            //{
            //    WMS.App_Code.JScript.ShowMessage(this.Page, "该产品编号已经存在!");
            //    return;
            //}


            bll.ExecNonQuery("Cmd.UpdateProduct", new DataParameter[] {
                new DataParameter("@ProductName", this.txtProductName.Text.Trim()),
                new DataParameter("@CategoryCode", this.ddlCategoryCode.SelectedValue),
                new DataParameter("@ProductEName", this.txtProductEName.Text),
                new DataParameter("@FactoryID", this.ddlFactory.SelectedValue),
                new DataParameter("@ModelNo", this.txtModelNo.Text.Trim()),
                new DataParameter("@Spec", this.txtSpec.Text.Trim()),
                new DataParameter("@Barcode", this.txtBarcode.Text.Trim()),
                new DataParameter("@Propertity", this.txtPropertity.Text.Trim()),
                new DataParameter("@Unit", this.txtUnit.Text.Trim()),
                new DataParameter("@Length", this.txtLength.Text.Trim()),
                new DataParameter("@Width", this.txtWidth.Text.Trim()),
                new DataParameter("@Height", this.txtHeight.Text.Trim()),
                new DataParameter("@Material", this.txtMaterial.Text.Trim()),
                new DataParameter("@Weight", this.txtWeight.Text.Trim()),
                new DataParameter("@Color", this.txtColor.Text.Trim()),
                new DataParameter("@StandardNo", this.txtStandardNo.Text.Trim()),
                new DataParameter("@PartNo", this.txtPartNo.Text.Trim()),
                new DataParameter("@ValidPeriod", this.txtValidPeriod.Text.Trim()),
                new DataParameter("@Description", this.txtDescription.Text.Trim()),
                new DataParameter("@AreaCode", bll.GetFieldValue("CMD_ProductCategory", "AreaCode", "CategoryCode='" + this.ddlCategoryCode.SelectedValue + "'")),
                new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                new DataParameter("@ProductCode", this.txtID.Text.Trim())
            });
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }
예제 #11
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_Product", string.Format("ProductCode='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.Instance.ShowMessage(this.Page, "该产品编号已经存在!");
                return;
            }

            //判断车型,轮对轴号 是否重复

            //Count=bll.GetRowCount("CMD_Product", string.Format("ProductCode='{0}'", this.txtID.Text));
            //if (Count > 0)
            //{
            //    WMS.App_Code.JScript.Instance.ShowMessage(this.Page, "该产品编号已经存在!");
            //    return;
            //}
            //, , , , , , , , , ,
            //      , , , , , , , , , , ,
            //      , , , , Creator, CreateDate, Updater, UpdateDate, ,



            bll.ExecNonQuery("Cmd.InsertProduct", new DataParameter[] {
                new DataParameter("@ProductCode", this.txtID.Text.Trim()),
                new DataParameter("@ProductName", this.txtProductName.Text.Trim()),
                new DataParameter("@ProductTypeCode", this.ddlProductTypeCode.SelectedValue),
                new DataParameter("@TrainTypeCode", ""),
                new DataParameter("@AxieNo", this.txtAxieNo.Text.Trim()),
                new DataParameter("@WheelDiameter", this.txtWheelDiameter.Text.Trim()),
                new DataParameter("@CCZ_Diameter", this.txtCCZ_Diameter.Text.Trim()),
                new DataParameter("@FCCZ_Diameter", this.txtFCCZ_Diameter.Text.Trim()),
                new DataParameter("@CCD_Diameter", this.txtCCD_Diameter.Text.Trim()),
                new DataParameter("@FCCD_Diameter", this.txtFCCD_Diameter.Text.Trim()),
                new DataParameter("@CCXPBZW_Size", this.txtCCXPBZW_Size.Text.Trim()),
                new DataParameter("@FCCXPBZW_Size", this.txtFCCXPBZW_Size.Text.Trim()),
                new DataParameter("@GearNo", this.txtGearNo.Text.Trim()),
                new DataParameter("@CCLX_Flag", this.txtCCLX_Flag.Text.Trim()),
                new DataParameter("@FCCLX_Flag", this.txtFCCLX_Flag.Text.Trim()),
                new DataParameter("@CCLX_Year", this.txtCCLX_Year.Text.Trim()),
                new DataParameter("@FCCLX_Year", this.txtFCCLX_Year.Text.Trim()),
                new DataParameter("@CCLX_Factory", ""),
                new DataParameter("@FCCLX_Factory", ""),
                new DataParameter("@CX_Factory", this.ddlCX_Factory.SelectedValue),
                new DataParameter("@CCLG_Flag", this.txtCCLG_Flag.Text.Trim()),
                new DataParameter("@FCCLG_Flag", ""),
                new DataParameter("@WarehouseCode", ""),
                new DataParameter("@AreaCode", bll.GetFieldValue("CMD_ProductType", "AreaCode", "ProductTypeCode='" + this.ddlProductTypeCode.SelectedValue + "'")),
                new DataParameter("@LDXC", this.txtLDXC.Text.Trim()),
                new DataParameter("@CX_DateTime", this.txtCX_DateTime.DateValue),
                new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                new DataParameter("@IsTemp", chkTemp.Checked ? "1" :"0")
            });
        }
        else //修改
        {
            //判断车型,轮对轴号 是否重复
            //int Count = bll.GetRowCount("CMD_Product", string.Format("ProductCode='{0}'", this.txtID.Text));
            //if (Count > 0)
            //{
            //    WMS.App_Code.JScript.Instance.ShowMessage(this.Page, "该产品编号已经存在!");
            //    return;
            //}


            bll.ExecNonQuery("Cmd.UpdateProduct", new DataParameter[] {
                new DataParameter("@ProductName", this.txtProductName.Text.Trim()),
                new DataParameter("@ProductTypeCode", this.ddlProductTypeCode.SelectedValue),
                new DataParameter("@TrainTypeCode", ""),
                new DataParameter("@AxieNo", this.txtAxieNo.Text.Trim()),
                new DataParameter("@WheelDiameter", this.txtWheelDiameter.Text.Trim()),
                new DataParameter("@CCZ_Diameter", this.txtCCZ_Diameter.Text.Trim()),
                new DataParameter("@FCCZ_Diameter", this.txtFCCZ_Diameter.Text.Trim()),
                new DataParameter("@CCD_Diameter", this.txtCCD_Diameter.Text.Trim()),
                new DataParameter("@FCCD_Diameter", this.txtFCCD_Diameter.Text.Trim()),
                new DataParameter("@CCXPBZW_Size", this.txtCCXPBZW_Size.Text.Trim()),
                new DataParameter("@FCCXPBZW_Size", this.txtFCCXPBZW_Size.Text.Trim()),
                new DataParameter("@GearNo", this.txtGearNo.Text.Trim()),
                new DataParameter("@CCLX_Flag", this.txtCCLX_Flag.Text.Trim()),
                new DataParameter("@FCCLX_Flag", this.txtFCCLX_Flag.Text.Trim()),
                new DataParameter("@CCLX_Year", this.txtCCLX_Year.Text.Trim()),
                new DataParameter("@FCCLX_Year", this.txtFCCLX_Year.Text.Trim()),
                new DataParameter("@CCLX_Factory", ""),
                new DataParameter("@FCCLX_Factory", ""),
                new DataParameter("@CX_Factory", this.ddlCX_Factory.SelectedValue),
                new DataParameter("@CCLG_Flag", this.txtCCLG_Flag.Text.Trim()),
                new DataParameter("@FCCLG_Flag", ""),
                new DataParameter("@WarehouseCode", ""),
                new DataParameter("@AreaCode", bll.GetFieldValue("CMD_ProductType", "AreaCode", "ProductTypeCode='" + this.ddlProductTypeCode.SelectedValue + "'")),
                new DataParameter("@IsTemp", chkTemp.Checked ? "1" :"0"),
                new DataParameter("@LDXC", this.txtLDXC.Text.Trim()),
                new DataParameter("@CX_DateTime", this.txtCX_DateTime.DateValue),
                new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                new DataParameter("@ProductCode", this.txtID.Text.Trim())
            });
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }