コード例 #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (this.txtAreaID.Text.Trim().Length == 0)//新增
        {
            int count = bll.GetRowCount(TableName, string.Format("AreaCode='{0}'", this.txtAreaCode.Text));
            if (count > 0)
            {
                JScript.Instance.ShowMessage(this, "此库区编码已存在,不能新增!");
                return;
            }

            bll.ExecNonQuery("Cmd.InsertArea", new DataParameter[] {
                new DataParameter("@AreaCode", this.txtAreaCode.Text),
                new DataParameter("@AreaName", this.txtAreaName.Text.Trim().Replace("\'", "\''")),
                new DataParameter("@WarehouseCode", this.txtWHID.Text),
                new DataParameter("@Memo", this.txtMemo.Text.Trim())
            });

            JScript.Instance.RegisterScript(this, "ReloadParent();");
            AddOperateLog("库区管理", "添加库区信息");
        }
        else
        {
            bll.ExecNonQuery("Cmd.UpdateArea", new DataParameter[] {
                new DataParameter("@AreaName", this.txtAreaName.Text.Trim().Replace("\'", "\''")),
                new DataParameter("@MEMO", this.txtMemo.Text.Trim()),
                new DataParameter("{0}", this.txtAreaID.Text)
            });


            JScript.Instance.RegisterScript(this, "UpdateParent();");
            AddOperateLog("库区管理", "修改库区信息");
        }
    }
コード例 #2
0
ファイル: WarehouseEditPage.aspx.cs プロジェクト: qq5013/ROBO
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (this.txtWHID.Text.Trim().Length == 0)//新增
        {
            int count = bll.GetRowCount("CMD_WAREHOUSE", string.Format("WarehouseCode='{0}'", this.txtWhCode.Text));
            if (count > 0)
            {
                JScript.ShowMessage(this, "此仓库编码已存在,不能新增!");
                return;
            }
            //新增
            bll.ExecNonQuery("Cmd.InsertWarehouse", new DataParameter[] { new DataParameter("@WarehouseCode", this.txtWhCode.Text), new DataParameter("@WarehouseName", this.txtWhName.Text.Trim().Replace("\'", "\''")), new DataParameter("@MEMO", this.txtMemo.Text.Trim()) });
            JScript.RegisterScript(this, "ReloadParent();");
            AddOperateLog("仓库管理", "添加仓库信息");
        }
        else
        {
            //更新
            bll.ExecNonQuery("Cmd.UpdateWarehouse", new DataParameter[] { new DataParameter("@WarehouseCode", this.txtWhCode.Text), new DataParameter("@WarehouseName", this.txtWhName.Text.Trim().Replace("\'", "\''")),
                                                                          new DataParameter("@MEMO", this.txtMemo.Text.Trim()), new DataParameter("{0}", this.txtWhCode.Text) });

            JScript.RegisterScript(this, "UpdateParent();");
            AddOperateLog("仓库管理", "修改仓库信息");
        }

        JScript.RegisterScript(this, "window.close();");
    }
コード例 #3
0
ファイル: RoleManage.aspx.cs プロジェクト: qq5013/ROBO
    protected void btnDeleteUser_Click(object sender, EventArgs e)
    {
        bll.ExecNonQuery("Security.UpdateUserGroup", new DataParameter[] { new DataParameter("@GroupID", 0), new DataParameter("{0}", ((Button)sender).CommandArgument) });


        BindDataSub(this.hdnRowValue.Value);
    }
コード例 #4
0
ファイル: CarEdit.aspx.cs プロジェクト: qq5013/CL_WMCS
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_Car", string.Format("CarNo='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.Instance.ShowMessage(this.Page, "该小车编码已经存在!");
                return;
            }

            bll.ExecNonQuery("Cmd.InsertCar", new DataParameter[] {
                new DataParameter("@CarNo", this.txtID.Text.Trim()),
                new DataParameter("@CarName", this.txtTypeName.Text.Trim()),
                new DataParameter("@State", this.ddlActive.SelectedValue),
                new DataParameter("@Memo", this.txtMemo.Text.Trim())
            });
        }
        else //修改
        {
            bll.ExecNonQuery("Cmd.UpdateCar", new DataParameter[] { new DataParameter("@CarName", this.txtTypeName.Text.Trim()),
                                                                    new DataParameter("@State", this.ddlActive.SelectedValue),
                                                                    new DataParameter("@Memo", this.txtMemo.Text.Trim()),

                                                                    new DataParameter("@CarNo", this.txtID.Text.Trim()) });
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }
コード例 #5
0
ファイル: ProductStateEdit.aspx.cs プロジェクト: qq5013/ROBO
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_ProductState", string.Format("StateNo='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.ShowMessage(this.Page, "该状态编码已经存在!");
                return;
            }

            bll.ExecNonQuery("Cmd.InsertProductState", new DataParameter[] { new DataParameter("@StateNo", this.txtID.Text.Trim()),
                                                                             new DataParameter("@StateName", this.txtStateName.Text.Trim()),

                                                                             new DataParameter("@MEMO", this.txtMemo.Text.Trim()),
                                                                             new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                                                                             new DataParameter("@Updater", Session["EmployeeCode"].ToString()) });
        }
        else //修改
        {
            bll.ExecNonQuery("Cmd.UpdateProductState", new DataParameter[] { new DataParameter("@StateName", this.txtStateName.Text.Trim()),

                                                                             new DataParameter("@MEMO", this.txtMemo.Text.Trim()),
                                                                             new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                                                                             new DataParameter("{0}", this.txtID.Text.Trim()) });
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }
コード例 #6
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_BillType", string.Format("BillTypeCode='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.Instance.ShowMessage(this.Page, "该类型编码已经存在!");
                return;
            }

            bll.ExecNonQuery("Cmd.InsertBillType", new DataParameter[] {
                new DataParameter("@BillTypeCode", this.txtID.Text.Trim()),
                new DataParameter("@BillTypeName", this.txtBillTypeName.Text.Trim()),
                new DataParameter("@Flag", "1"),
                new DataParameter("@TaskType", "11"),
                new DataParameter("@TaskLevel", 1),
                new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                new DataParameter("@Updater", Session["EmployeeCode"].ToString())
            });
        }
        else //修改
        {
            bll.ExecNonQuery("Cmd.UpdateBillType", new DataParameter[] { new DataParameter("@BillTypeName", this.txtBillTypeName.Text.Trim()),
                                                                         new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                                                                         new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                                                                         new DataParameter("@BillTypeCode", this.txtID.Text.Trim()) });
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }
コード例 #7
0
 private void InsertDataLog(string LogLevel, string text)
 {
     try
     {
         bll.ExecNonQuery("WCS.InsertDataLog", new DataParameter[] { new DataParameter("{0}", LogLevel), new DataParameter("{1}", CurrentUser), new DataParameter("{2}", text) });
     }
     catch (Exception ex)
     {
     }
 }
コード例 #8
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.txtShelfID.Text.Trim().Length == 0)
            {
                int count = bll.GetRowCount("CMD_WH_SHELF", string.Format("ShelfCode='{0}'", this.txtShelfCode.Text));
                if (count > 0)
                {
                    JScript.ShowMessage(this, "此货架编码已存在,不能新增!");
                    return;
                }

                bll.ExecNonQuery("Cmd.InsertShelf", new DataParameter[] {
                    new DataParameter("@WarehouseCode", this.txtWHID.Text),
                    new DataParameter("@AreaCode", this.txtAreaID.Text.Trim()),
                    new DataParameter("@ShelfCode", this.txtShelfCode.Text),
                    new DataParameter("@ShelfName", this.txtShelfName.Text.Trim()),
                    new DataParameter("@Rows", this.txtCellRows.Text),
                    new DataParameter("@Columns", this.txtCellCols.Text.Trim()),
                    new DataParameter("@IsActive", this.ddlActive.SelectedValue),
                    new DataParameter("@Memo", this.txtMemo.Text.Trim())
                });
                //this.btnContinue.Enabled = true;
                //this.btnSave.Enabled = false;
                JScript.RegisterScript(this, "ReloadParent();");
                Common.AddOperateLog(Session["G_user"].ToString(), "货贺管理", "添加货贺信息");
            }
            else
            {
                bll.ExecNonQuery("Cmd.UpdateShelf", new DataParameter[] { new DataParameter("@WarehouseCode", this.txtWHID.Text),
                                                                          new DataParameter("@AreaCode", this.txtAreaID.Text.Trim()),
                                                                          new DataParameter("@ShelfName", this.txtShelfName.Text.Trim()),
                                                                          new DataParameter("@Rows", this.txtCellRows.Text),
                                                                          new DataParameter("@Columns", this.txtCellCols.Text.Trim()),
                                                                          new DataParameter("@IsActive", this.ddlActive.SelectedValue),
                                                                          new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                                                                          new DataParameter("@ShelfCode", this.txtShelfCode.Text),
                                                                          new DataParameter("{0}", this.txtShelfID.Text) });


                JScript.RegisterScript(this, "UpdateParent();");
                Common.AddOperateLog(Session["G_user"].ToString(), "货贺管理", "修改货贺信息");
            }
        }
        catch (Exception exp)
        {
            JScript.ShowMessage(this, exp.Message);
        }
        //JScript.RegisterScript(this, "window.close();");
    }
コード例 #9
0
    /// <summary>
    /// 保存当前组用户
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            UpdateTempUser();
            string users = "-1,";

            if (ViewState["hdnRowValue"].ToString().Length > 0)
                users += ViewState["hdnRowValue"].ToString().Replace("'", "");

            users += "-1";

            BLL.BLLBase bll = new BLL.BLLBase();
            bll.ExecNonQuery("Security.UpdateUserGroup", new DataParameter[] { new DataParameter("@GroupID", GroupID), new DataParameter("{0}", users) });

            ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, this.UpdatePanel1.GetType(), "Resize", "Close('1');", true);

        }
        catch (Exception ex)
        {
            System.Diagnostics.StackFrame frame = new System.Diagnostics.StackFrame(0);
            Session["ModuleName"] = this.Page.Title;
            Session["FunctionName"] = frame.GetMethod().Name;
            Session["ExceptionalType"] = ex.GetType().FullName;
            Session["ExceptionalDescription"] = ex.Message;
            Response.Redirect("../../../Common/MistakesPage.aspx");

        }
    }
コード例 #10
0
    /// <summary>
    /// 保存当前组用户

    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            UpdateTempUser();
            string users = "-1,";

            if (ViewState["hdnRowValue"].ToString().Length > 0)
            {
                users += ViewState["hdnRowValue"].ToString().Replace("'", "");
            }



            users += "-1";

            BLL.BLLBase bll = new BLL.BLLBase();
            bll.ExecNonQuery("Security.UpdateUserGroup", new DataParameter[] { new DataParameter("@GroupID", GroupID), new DataParameter("{0}", users) });

            ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, this.UpdatePanel1.GetType(), "Resize", "Close('1');", true);
        }
        catch (Exception ex)
        {
            System.Diagnostics.StackFrame frame = new System.Diagnostics.StackFrame(0);
            Session["ModuleName"]             = this.Page.Title;
            Session["FunctionName"]           = frame.GetMethod().Name;
            Session["ExceptionalType"]        = ex.GetType().FullName;
            Session["ExceptionalDescription"] = ex.Message;
            Response.Redirect("../../../Common/MistakesPage.aspx");
        }
    }
コード例 #11
0
    protected void btnDeletet_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)
            {
                HyperLink hk = (HyperLink)(this.GridView1.Rows[i].FindControl("HyperLink1"));
                //判断能否删除
                int Count = bll.GetRowCount("VUsed_CMD_BillType", string.Format("BillTypeCode='{0}'", hk.Text));
                if (Count > 0)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, GridView1.Rows[i].Cells[2].Text + "入库类型被其它单据使用,请调整后再删除!");
                    return;
                }

                strColorCode += "'" + hk.Text + "',";
            }
        }
        strColorCode += "'-1'";

        bll.ExecNonQuery("Cmd.DeleteBillType", new DataParameter[] { new DataParameter("{0}", strColorCode) });
        AddOperateLog("入库类型", "删除单号:" + strColorCode.Replace("'-1',", "").Replace(",'-1'", ""));
        SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, GridView1, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
    }
コード例 #12
0
ファイル: Common.cs プロジェクト: baoyigang/ZKSA
 public static void AddOperateLog(string UserName, string moduleName, string executeOperation)
 {
     //
     BLL.BLLBase bll = new BLL.BLLBase();
     bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[] { new DataParameter("@LoginUser", UserName), new DataParameter("@LoginTime", DateTime.Now),
                                                                          new DataParameter("@LoginModule", moduleName), new DataParameter("@ExecuteOperator", executeOperation) });
 }
コード例 #13
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);
    }
コード例 #14
0
    protected void btnDeletet_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)
            {
                HyperLink hk = (HyperLink)(this.GridView1.Rows[i].FindControl("HyperLink1"));
                //判断能否删除
                int Count = bll.GetRowCount("VUsed_CMD_Product", string.Format("ProductCode='{0}'", hk.Text));
                if (Count > 0)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, GridView1.Rows[i].Cells[2].Text + "车型信息被其它单据使用,请调整后再删除!");
                    return;
                }

                strColorCode += "'" + hk.Text + "',";
            }
        }
        strColorCode += "'-1'";


        bll.ExecNonQuery("Cmd.DeleteProduct", new DataParameter[] { new DataParameter("{0}", strColorCode) });
        AddOperateLog("产品信息", "删除单号:" + strColorCode.Replace("'-1',", "").Replace(",'-1'", ""));
        SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, GridView1, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
    }
コード例 #15
0
ファイル: UserList.aspx.cs プロジェクト: qq5013/CL_WMCS
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            string strUserID = "-1,";
            for (int i = 0; i < gvMain.Rows.Count; i++)
            {
                CheckBox chk = (CheckBox)gvMain.Rows[i].Cells[0].Controls[0];
                if (gvMain.Rows[i].Cells[1].Text == "admin" && chk.Checked)
                {
                    JScript.Instance.ShowMessage(this.UpdatePanel1, "管理员帐号不能删除!");
                    continue;
                }
                if (chk.Enabled && chk.Checked)
                {
                    strUserID += dtUser.Rows[i]["UserID"].ToString() + ",";
                }
            }
            strUserID += "-1";


            bll.ExecNonQuery("Security.DeleteUser", new DataParameter[] { new DataParameter("{0}", strUserID) });
            AddOperateLog("用户管理", "删除用户信息");
            SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, gvMain, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
        }
        catch (Exception exp)
        {
            JScript.Instance.ShowMessage(this.UpdatePanel1, exp.Message);
        }
    }
コード例 #16
0
ファイル: UserGroup.aspx.cs プロジェクト: qq5013/ROBO
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            string strGroupID = "-1,";
            for (int i = 0; i < gvMain.Rows.Count; i++)
            {
                CheckBox chk = (CheckBox)gvMain.Rows[i].Cells[0].Controls[0];
                if (chk.Enabled && chk.Checked)
                {
                    int membercount = (int)bll.ExecScalar("Security.SelectGroupMemberCount", new DataParameter[] { new DataParameter("@GroupID", Convert.ToInt32(dtGroup.Rows[i]["GroupID"])) });
                    if (membercount > 0)
                    {
                        JScript.ShowMessage(this.UpdatePanel1, gvMain.Rows[i].Cells[1].Text + "用户组还有用户存在,请调整后再删除!");
                        return;
                    }

                    strGroupID += dtGroup.Rows[i]["GroupID"].ToString() + ",";
                }
            }
            strGroupID += "-1";


            bll.ExecNonQuery("Security.DeleteGroup", new DataParameter[] { new DataParameter("{0}", strGroupID) });
            AddOperateLog("用户管理", "删除用户信息");
            SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, gvMain, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
        }
        catch (Exception exp)
        {
            JScript.ShowMessage(this.UpdatePanel1, exp.Message);
        }
    }
コード例 #17
0
ファイル: ConfigPlan.aspx.cs プロジェクト: haipingma/CL_WMCS
    protected void btnSave_Click(object sender, EventArgs e)
    {
        BLL.BLLBase bll = new BLL.BLLBase();
        bll.ExecNonQuery("Security.DeleteQuickDestop", new DataParameter[] { new DataParameter("@UserID", Convert.ToInt32(Session["UserID"].ToString())) });

        foreach (TreeNode tnRoot in this.sTreeModule.Nodes)
        {
            foreach (TreeNode tnSub in tnRoot.ChildNodes)
            {
                if (tnSub.Checked)
                {
                    string strModuleID = tnSub.Value;

                    bll.ExecNonQuery("Security.InsertQuickDestop", new DataParameter[] { new DataParameter("@UserID", Convert.ToInt32(Session["UserID"].ToString())), new DataParameter("@ModuleID", strModuleID) });
                }
            }
        }

        JScript.Instance.ShowMessage(this, "设置成功!");
    }
コード例 #18
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        BLL.BLLBase bll = new BLL.BLLBase();
        bll.ExecNonQuery("Security.DeleteQuickDestop", new DataParameter[] { new DataParameter("@UserID", Convert.ToInt32(Session["UserID"].ToString())) });

        foreach (TreeNode tnRoot in this.sTreeModule.Nodes)
        {
            foreach (TreeNode tnSub in tnRoot.ChildNodes)
            {
                if (tnSub.Checked)
                {
                    string strModuleID = tnSub.Value;

                    bll.ExecNonQuery("Security.InsertQuickDestop", new DataParameter[] { new DataParameter("@UserID", Convert.ToInt32(Session["UserID"].ToString())), new DataParameter("@ModuleID", strModuleID) });
                }
            }
        }

        JScript.Instance.ShowMessage(this, "设置成功!");
    }
コード例 #19
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_ProductCategory", string.Format("CategoryCode='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.Instance.ShowMessage(this.Page, "该类别编码已经存在!");
                return;
            }

            bll.ExecNonQuery("Cmd.InsertProductCategory", new DataParameter[] {
                new DataParameter("@CategoryCode", this.txtID.Text.Trim()),
                new DataParameter("@CategoryName", this.txtProductTypeName.Text.Trim()),
                new DataParameter("@WarehouseCode", ""),
                new DataParameter("@AreaCode", ""),
                new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                new DataParameter("@Updater", Session["EmployeeCode"].ToString())
            });
        }
        else //修改
        {
            string Comd = "Cmd.UpdateProductCategory";



            DataParameter[] paras = new DataParameter[] { new DataParameter("@CategoryName", this.txtProductTypeName.Text.Trim()),
                                                          new DataParameter("@WarehouseCode", ""),
                                                          new DataParameter("@AreaCode", ""),
                                                          new DataParameter("@Memo", this.txtMemo.Text.Trim()),
                                                          new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                                                          new DataParameter("@CategoryCode", this.txtID.Text.Trim()) };


            bll.ExecNonQuery(Comd, paras);
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }
コード例 #20
0
ファイル: FactoryEdit.aspx.cs プロジェクト: qq5013/ROBO
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (strID == "") //新增
        {
            int Count = bll.GetRowCount("CMD_Factory", string.Format("FactoryID='{0}'", this.txtID.Text));
            if (Count > 0)
            {
                JScript.ShowMessage(this.Page, "该厂家编码已经存在!");
                return;
            }

            bll.ExecNonQuery("Cmd.InsertFactory", new DataParameter[] { new DataParameter("@FactoryID", this.txtID.Text.Trim()),
                                                                        new DataParameter("@FactoryName", this.txtFactoryName.Text.Trim()),
                                                                        new DataParameter("@Flag", 1),
                                                                        new DataParameter("@LinkPerson", this.txtLinkPerson.Text.Trim()),
                                                                        new DataParameter("@LinkPhone", this.txtLinkPhone.Text.Trim()),
                                                                        new DataParameter("@Fax", this.txtFax.Text.Trim()),
                                                                        new DataParameter("@Address", this.txtAddress.Text.Trim()),
                                                                        new DataParameter("@MEMO", this.txtMemo.Text.Trim()),
                                                                        new DataParameter("@Creator", Session["EmployeeCode"].ToString()),
                                                                        new DataParameter("@Updater", Session["EmployeeCode"].ToString()) });
        }
        else //修改
        {
            bll.ExecNonQuery("Cmd.UpdateFactory", new DataParameter[] { new DataParameter("@FactoryName", this.txtFactoryName.Text.Trim()),
                                                                        new DataParameter("@Flag", 1),
                                                                        new DataParameter("@LinkPerson", this.txtLinkPerson.Text.Trim()),
                                                                        new DataParameter("@LinkPhone", this.txtLinkPhone.Text.Trim()),
                                                                        new DataParameter("@Fax", this.txtFax.Text.Trim()),
                                                                        new DataParameter("@Address", this.txtAddress.Text.Trim()),
                                                                        new DataParameter("@MEMO", this.txtMemo.Text.Trim()),
                                                                        new DataParameter("@Updater", Session["EmployeeCode"].ToString()),
                                                                        new DataParameter("{0}", this.txtID.Text.Trim()) });
        }

        Response.Redirect(FormID + "View.aspx?SubModuleCode=" + SubModuleCode + "&FormID=" + Server.UrlEncode(FormID) + "&SqlCmd=" + SqlCmd + "&ID=" + Server.UrlEncode(this.txtID.Text));
    }
コード例 #21
0
ファイル: OperationLog.aspx.cs プロジェクト: qq5013/ROBO
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        try
        {
            string strGroupID = "-1,";
            for (int i = 0; i < gvMain.Rows.Count; i++)
            {
                CheckBox chk = (CheckBox)(this.gvMain.Rows[i].FindControl("cbSelect"));
                if (chk.Enabled && chk.Checked)
                {
                    strGroupID += dtLog.Rows[i]["OperatorLogID"].ToString() + ",";
                }
            }
            strGroupID += "-1";
            bll.ExecNonQuery("Security.DeleteOperatorLog", new DataParameter[] { new DataParameter("{0}", strGroupID) });

            AddOperateLog("操作日志管理", "删除操作日志");
            dtLog = SetBtnEnabled(int.Parse(ViewState["CurrentPage"].ToString()), SqlCmd, ViewState["filter"].ToString(), pageSize, gvMain, btnFirst, btnPre, btnNext, btnLast, btnToPage, lblCurrentPage, this.UpdatePanel1);
        }
        catch (Exception exp)
        {
            JScript.ShowMessage(this.UpdatePanel1, exp.Message);
        }
    }
コード例 #22
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        string strID = this.txtID.Text;
        int    Count = bll.GetRowCount("VUsed_CMD_BillType", string.Format("BillTypeCode='{0}'", this.txtID.Text.Trim()));

        if (Count > 0)
        {
            JScript.Instance.ShowMessage(this.updatePanel, "该类型编码已被其它单据使用,请调整后再删除!");
            return;
        }
        bll.ExecNonQuery("Cmd.DeleteBillType", new DataParameter[] { new DataParameter("{0}", "'" + strID + "'") });
        AddOperateLog("入库类型", "删除单号:" + strID);

        btnNext_Click(sender, e);
        if (this.txtID.Text == strID)
        {
            btnPre_Click(sender, e);
            if (this.txtID.Text == strID)
            {
                BindDataNull();
            }
        }
    }
コード例 #23
0
ファイル: Login.aspx.cs プロジェクト: haipingma/CL_WMCS
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        //测试
        Request.Cookies.Clear();
        if (txtUserName.Text.Trim() != "")
        {
            try
            {
                string key = txtUserName.Text.ToLower();
                string UserCache = Convert.ToString(Cache[key]);

                UserBll userBll = new UserBll();

                DataTable dtUserList = userBll.GetUserInfo(txtUserName.Text.Trim());
                if (dtUserList != null && dtUserList.Rows.Count > 0)
                {
                    if (dtUserList.Rows[0]["UserPassword"].ToString().Trim() == txtPassWord.Text.Trim())
                    {
                        FormsAuthentication.SetAuthCookie(this.txtUserName.Text, false);

                        Session["UserID"] = dtUserList.Rows[0]["UserID"].ToString();
                        Session["GroupID"] = dtUserList.Rows[0]["GroupID"].ToString();
                        Session["G_user"] = dtUserList.Rows[0]["UserName"].ToString();

                        string EmployeeCode = dtUserList.Rows[0]["EmployeeCode"].ToString();

                        Session["EmployeeCode"] = dtUserList.Rows[0]["EmployeeCode"].ToString();
                        #region 添加登录日志

                        BLL.BLLBase bll = new BLL.BLLBase();
                        bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[]{new DataParameter("@LoginUser", Session["G_user"].ToString()),new DataParameter("@LoginTime",DateTime.Now),
                                                         new DataParameter("@LoginModule","登录系统"),new DataParameter("@ExecuteOperator","用户登录")});

                        #endregion
                        TimeSpan stLogin = new TimeSpan(0, 0, System.Web.HttpContext.Current.Session.Timeout, 0, 0);
                        HttpContext.Current.Cache.Insert(key, Page.Request.UserHostAddress, null, DateTime.MaxValue, stLogin, System.Web.Caching.CacheItemPriority.NotRemovable, null);

                        Response.Redirect("Default.aspx", false);
                    }
                    else
                    {
                        BLL.BLLBase bll = new BLL.BLLBase();
                        bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[]{new DataParameter("@LoginUser",this.txtUserName.Text.Trim()),new DataParameter("@LoginTime",DateTime.Now),
                                                         new DataParameter("@LoginModule","登录页面"),new DataParameter("@ExecuteOperator","登录(用户密码有误)")});
                        ltlMessage.Text = "对不起,您输入的密码有误!";
                    }
                }
                else
                {
                    ltlMessage.Text = "对不起,您输入的用户名不存在!";
                }

            }
            catch (Exception exp)
            {
                ltlMessage.Text = exp.Message;
            }
        }
        else
        {
            ltlMessage.Text = "请输入用户名!";
        }
    }
コード例 #24
0
ファイル: BasePage.cs プロジェクト: haipingma/CL_WMCS
 /// <summary>
 /// 添加操作日志
 /// </summary>
 /// <param name="moduleName">操作模块</param>
 /// <param name="executeOperation">操作内容</param>
 protected void AddOperateLog(string moduleName, string executeOperation)
 {
     BLL.BLLBase bll = new BLL.BLLBase();
     bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[]{new DataParameter("@LoginUser",Session["G_user"].ToString()),new DataParameter("@LoginTime",DateTime.Now),
                                                      new DataParameter("@LoginModule",moduleName),new DataParameter("@ExecuteOperator",executeOperation)});
 }
コード例 #25
0
 /// <summary>
 /// 添加操作日志
 /// </summary>
 /// <param name="moduleName">操作模块</param>
 /// <param name="executeOperation">操作内容</param>
 protected void AddOperateLog(string moduleName, string executeOperation)
 {
     BLL.BLLBase bll = new BLL.BLLBase();
     bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[] { new DataParameter("@LoginUser", Session["G_user"].ToString()), new DataParameter("@LoginTime", DateTime.Now),
                                                                          new DataParameter("@LoginModule", moduleName), new DataParameter("@ExecuteOperator", executeOperation) });
 }
コード例 #26
0
ファイル: Server.cs プロジェクト: baoyigang/ZKSA
        /// <summary>
        /// 中間數據庫插入WCS數據庫,并轉入WCS_Task
        /// </summary>
        /// <param name="dt"></param>
        internal static void InsertTaskToWcs(DataTable dt, bool blnUpdateAck)
        {
            lock (Locker1)
            {
                try
                {
                    BLL.BLLBase bllStock  = new BLLBase("StockDB");
                    bool        blnCheck  = true;
                    string      SubTaskID = "";
                    //判斷中間表貨位是否正常
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        DataRow dr = dt.Rows[i];
                        if (dr["from_location_id"].ToString().Trim().Length == 6)
                        {
                            if (bllStock.GetRowCount("CMD_CEll", string.Format("AreaCode='{0}' and CellName='{1}'", dr["equipment"].ToString(), dr["from_location_id"].ToString())) == 0)
                            {
                                MCP.Logger.Error("WMS明細ID:" + dr["subtask_id"].ToString() + "分配貨位出錯!庫區" + dr["equipment"].ToString() + "不存在貨位:" + dr["from_location_id"].ToString());
                                blnCheck = false;
                                break;
                            }
                        }
                        if (dr["to_location_id"].ToString().Trim().Length == 6)
                        {
                            if (bllStock.GetRowCount("CMD_CEll", string.Format("AreaCode='{0}' and CellName='{1}'", dr["equipment"].ToString(), dr["to_location_id"].ToString())) == 0)
                            {
                                MCP.Logger.Error("WMS明細ID:" + dr["subtask_id"].ToString() + "分配貨位出錯!庫區" + dr["equipment"].ToString() + "不存在貨位:" + dr["to_location_id"].ToString());
                                blnCheck = false;
                                break;
                            }
                        }
                        SubTaskID = dr["subtask_id"].ToString() + ",";
                    }
                    if (!blnCheck)
                    {
                        return;
                    }


                    //删除现有数据,避免重复
                    bllStock.ExecNonQuery("WCS.DeleteAsrsTaskTMP", new DataParameter[] { new DataParameter("{0}", SubTaskID.TrimEnd(',')) });

                    //插入中間表
                    bllStock.BatchInsertTable(dt, "AsrsTask_TMP");

                    DataTable dtTaskID = dt.DefaultView.ToTable(true, "task_id");

                    List <string>          MiddleComds = new List <string>();
                    List <DataParameter[]> Middleparas = new List <DataParameter[]>();

                    List <string>          StockComds = new List <string>();
                    List <DataParameter[]> Stockparas = new List <DataParameter[]>();
                    for (int i = 0; i < dtTaskID.Rows.Count; i++)
                    {
                        DataRow[] drsTask = dt.Select(string.Format("task_id='{0}'", dtTaskID.Rows[i]["task_id"].ToString()));
                        //更新中間表状态
                        string taskID    = drsTask[0]["task_id"].ToString();
                        string SubtaskID = drsTask[0]["subtask_id"].ToString();

                        MiddleComds.Add("Middle.UpdateAsrsTaskAck");
                        MiddleComds.Add("Middle.UpdateAsrsSubTaskAck");
                        string strWhere = string.Format("subtask_id='{0}'", SubtaskID);
                        if (drsTask.Length > 1)
                        {
                            strWhere = "1=1";
                        }
                        Middleparas.Add(new DataParameter[] { new DataParameter("@TaskID", taskID) });
                        Middleparas.Add(new DataParameter[] { new DataParameter("@TaskID", taskID), new DataParameter("{0}", strWhere) });
                        for (int j = 0; j < drsTask.Length; j++)
                        {
                            SubtaskID = drsTask[j]["subtask_id"].ToString();
                            StockComds.Add("WCS.InsertWCSTask");
                            Stockparas.Add(new DataParameter[] { new DataParameter("@subtaskid", SubtaskID) });
                        }
                    }

                    bllStock.ExecTran(StockComds.ToArray(), Stockparas);

                    BLL.BLLBase bllMiddle = new BLLBase("MiddleDB");
                    if (blnUpdateAck)
                    {
                        bllMiddle.ExecTran(MiddleComds.ToArray(), Middleparas);
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
コード例 #27
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.txtCELLID.Text.Trim().Length == 0)//新增
            {
                int count = bll.GetRowCount("CMD_WH_CELL", string.Format("CellCode='{0}'", this.txtCellCode.Text));
                if (count > 0)
                {
                    JScript.ShowMessage(this, "此货位编码已存在,不能新增!");
                    return;
                }
                string comds = "Cmd.InsertCell";


                DataParameter[] paras = new DataParameter[] { new DataParameter("@CellCode", this.txtCellCode.Text),
                                                              new DataParameter("@CellName", this.txtCellName.Text.Trim().Replace("\'", "\''")),
                                                              new DataParameter("@AreaCode", this.txtAreaID.Text),
                                                              new DataParameter("@ShelfCode", this.txtShelfID.Text.Trim()),
                                                              new DataParameter("@CellRow", this.txtCellRows.Text),
                                                              new DataParameter("@CellColumn", this.txtCellCols.Text.Trim()),
                                                              new DataParameter("@IsActive", this.ddlActive.SelectedValue),
                                                              new DataParameter("@IsLock", this.ddlLock.SelectedValue),
                                                              new DataParameter("@Memo", this.txtMemo.Text) };

                bll.ExecNonQuery(comds, paras);


                this.btnSave.Enabled = false;

                JScript.RegisterScript(this, "ReloadParent();");
                Common.AddOperateLog(Session["G_user"].ToString(), "货位管理", "添加货位信息");
            }
            else//修改
            {
                string strWhere = "";

                if (this.rpt1.Checked)
                {
                    strWhere = string.Format("CellCode='{0}'", this.txtCELLID.Text);
                }
                else if (this.rpt2.Checked)
                {
                    strWhere = string.Format("CellRow={0} and AreaCode='{1}' and ShelfCode='{2}' and ProductCode not in ('0001','0002')", this.txtCellRows.Text, this.txtAreaID.Text, this.txtShelfID.Text);
                    int count = bll.GetRowCount("Cmd_Cell", string.Format("CellRow={0} and AreaCode='{1}' and ShelfCode='{2}' and ProductCode not in ('0001','0002') and ProductCode!=''", this.txtCellRows.Text, this.txtAreaID.Text, this.txtShelfID.Text));
                    if (count > 0)
                    {
                        JScript.ShowMessage(this, "货位所在货架层的所有货位中有存放产品的货位,无法整层修改!");
                        return;
                    }
                }
                else
                {
                    strWhere = string.Format("CellColumn={0} and AreaCode='{1}' and ShelfCode='{2}' and ProductCode not in ('0001','0002')", this.txtCellCols.Text, this.txtAreaID.Text, this.txtShelfID.Text);
                    int count = bll.GetRowCount("Cmd_Cell", string.Format("CellColumn={0} and AreaCode='{1}' and ShelfCode='{2}' and ProductCode not in ('0001','0002') and ProductCode!=''", this.txtCellCols.Text, this.txtAreaID.Text, this.txtShelfID.Text));
                    if (count > 0)
                    {
                        JScript.ShowMessage(this, "货位所在货架列的所有货位中有存放产品的货位,无法整列修改!");
                        return;
                    }
                }



                bll.ExecNonQuery("Cmd.UpdateCell", new DataParameter[] {
                    new DataParameter("@AreaCode", this.ddlAreaCode.SelectedValue),
                    new DataParameter("@IsActive", this.ddlActive.SelectedValue),
                    new DataParameter("@MEMO", this.txtMemo.Text),
                    new DataParameter("{0}", strWhere)
                });

                JScript.RegisterScript(this, "UpdateParent();");
                Common.AddOperateLog(Session["G_user"].ToString(), "货位管理", "修改货位信息");
            }
        }
        catch (Exception exp)
        {
            JScript.ShowMessage(this, exp.Message);
        }
    }
コード例 #28
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        //测试
        Request.Cookies.Clear();
        if (txtUserName.Text.Trim() != "")
        {
            try
            {
                string key       = txtUserName.Text.ToLower();
                string UserCache = Convert.ToString(Cache[key]);


                UserBll userBll = new UserBll();

                DataTable dtUserList = userBll.GetUserInfo(txtUserName.Text.Trim());
                if (dtUserList != null && dtUserList.Rows.Count > 0)
                {
                    if (dtUserList.Rows[0]["UserPassword"].ToString().Trim() == txtPassWord.Text.Trim())
                    {
                        FormsAuthentication.SetAuthCookie(this.txtUserName.Text, false);


                        Session["UserID"]  = dtUserList.Rows[0]["UserID"].ToString();
                        Session["GroupID"] = dtUserList.Rows[0]["GroupID"].ToString();
                        Session["G_user"]  = dtUserList.Rows[0]["UserName"].ToString();


                        string EmployeeCode = dtUserList.Rows[0]["EmployeeCode"].ToString();


                        Session["EmployeeCode"] = dtUserList.Rows[0]["EmployeeCode"].ToString();
                        #region 添加登录日志

                        BLL.BLLBase bll = new BLL.BLLBase();
                        bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[] { new DataParameter("@LoginUser", Session["G_user"].ToString()), new DataParameter("@LoginTime", DateTime.Now),
                                                                                             new DataParameter("@LoginModule", "登录系统"), new DataParameter("@ExecuteOperator", "用户登录") });


                        DataTable dt = bll.FillDataTable("Security.SelectGroupRole", new DataParameter[] { new DataParameter("@GroupID", Session["GroupID"].ToString()), new DataParameter("@SystemName", "WMS") });
                        Session["DT_UserOperation"] = dt;

                        #endregion
                        TimeSpan stLogin = new TimeSpan(0, 0, System.Web.HttpContext.Current.Session.Timeout, 0, 0);
                        HttpContext.Current.Cache.Insert(key, Page.Request.UserHostAddress, null, DateTime.MaxValue, stLogin, System.Web.Caching.CacheItemPriority.NotRemovable, null);

                        Response.Redirect("Default.aspx", false);
                    }
                    else
                    {
                        BLL.BLLBase bll = new BLL.BLLBase();
                        bll.ExecNonQuery("Security.InsertOperatorLog", new DataParameter[] { new DataParameter("@LoginUser", this.txtUserName.Text.Trim()), new DataParameter("@LoginTime", DateTime.Now),
                                                                                             new DataParameter("@LoginModule", "登录页面"), new DataParameter("@ExecuteOperator", "登录(用户密码有误)") });
                        ltlMessage.Text = "对不起,您输入的密码有误!";
                    }
                }
                else
                {
                    ltlMessage.Text = "对不起,您输入的用户名不存在!";
                }
            }
            catch (Exception exp)
            {
                ltlMessage.Text = exp.Message;
            }
        }
        else
        {
            ltlMessage.Text = "请输入用户名!";
        }
    }
コード例 #29
0
ファイル: MachineEdit.aspx.cs プロジェクト: qq5013/CL_WMCS
    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));
    }
コード例 #30
0
ファイル: ProductEdit.aspx.cs プロジェクト: qq5013/ROBO
    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));
    }