示例#1
0
        public override int SaveChanges()
        {
            List <ChangeLog> logs = GetEntityChanges();

            ChangeLogs.AddRange(logs);
            return(base.SaveChanges());
        }
示例#2
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Trim() == "del")
        {
            GridViewRow gvrow        = (GridViewRow)(((LinkButton)e.CommandSource).Parent.Parent);
            string      LanguageCode = ((Label)gvrow.FindControl("lblLanguageCode")).Text.Trim();
            string      id           = e.CommandArgument.ToString();
            ChangeLogs  cl           = new ChangeLogs("language", "ltrim(rtrim(str(ID)))");
            cl.AddRecord(id);

            int var = BLL.other.Company.LanguageBLL.DelLanguage(Convert.ToInt32(id), LanguageCode);
            if (var > 0)
            {
                cl.AddRecord(id);
                cl.DeletedIntoLogs(ChangeCategory.company35, Session["Company"].ToString(), ENUM_USERTYPE.objecttype9);

                BLL.CommonClass.Transforms.JSAlert(GetTran("000008", "删除成功!"));
                LanguageBind();
            }
            else
            {
                BLL.CommonClass.Transforms.JSAlert(GetTran("000009", "删除失败!"));
            }
        }
    }
示例#3
0
    private void deleteItem(int id)
    {
        using (SqlConnection conn = new SqlConnection(DBHelper.connString))
        {
            conn.Open();
            using (SqlTransaction tran = conn.BeginTransaction())
            {
                try
                {
                    ChangeLogs cl = new ChangeLogs("smscontent", "ltrim(rtrim(str(ProductID)))");
                    cl.AddRecordtran(tran, id.ToString());

                    SMScontentBLL.deleteSMScontent(tran, id);
                    cl.AddRecordtran(tran, id.ToString());
                    cl.DeletedIntoLogs(ChangeCategory.company23, Session["Company"].ToString(), ENUM_USERTYPE.objecttype10);
                    tran.Commit();
                }
                catch
                {
                    tran.Rollback();
                    lblMessage.Text = GetTran("007147", "短信删除失败,请联系管理员!");
                    return;
                }
            }
        }

        lblMessage.Text = GetTran("007146", "短信删除成功");
    }
示例#4
0
    /// <summary>
    /// 判断是删除还是修改功能
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gwbankCard_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "updCard")
        {   //获取id
            int         id    = int.Parse(e.CommandArgument.ToString());
            GridViewRow gvrow = (GridViewRow)(((LinkButton)e.CommandSource).Parent.Parent);
            this.txtbank.Text     = gwbankCard.Rows[gvrow.RowIndex].Cells[2].Text.Trim();
            this.txtname.Text     = gwbankCard.Rows[gvrow.RowIndex].Cells[3].Text.Trim();
            this.txtcard.Text     = gwbankCard.Rows[gvrow.RowIndex].Cells[4].Text.Trim();
            ViewState["ID"]       = id;
            ViewState["bnakbook"] = gwbankCard.Rows[gvrow.RowIndex].Cells[3].Text.Trim();
            this.TranControls(this.but1, new string[][] { new string[] { "001124", "保 存" } });
        }
        else if (e.CommandName == "delCard")
        {
            //获取id
            int        id = int.Parse(e.CommandArgument.ToString());
            ChangeLogs cl = new ChangeLogs("companybank", "ltrim(rtrim(str(id)))");
            cl.AddRecord(id);
            if (CompanyBankBLL.DelCompanyBank(id))
            {
                cl.AddRecord(id);
                cl.DeletedIntoLogs(ChangeCategory.company13, Session["Company"].ToString(), ENUM_USERTYPE.objecttype3);
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("000749", "删除成功!") + "')</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("000417", "删除失败!") + "')</script>");
            }
            ViewState["ID"] = null;
        }

        bindcontrol(null, null);
    }
示例#5
0
    public override int SaveChanges()
    {
        var modifiedEntities = ChangeTracker.Entries().Where(p => p.State == EntityState.Modified).ToList();

        foreach (var change in modifiedEntities)
        {
            var entityName     = System.Data.Entity.Core.Objects.ObjectContext.GetObjectType(change.Entity.GetType()).ToString();
            var primaryKey     = GetPrimaryKeyValue(change);
            var databaseValues = change.GetDatabaseValues();

            foreach (var prop in change.OriginalValues.PropertyNames)
            {
                var originalValue = databaseValues?.GetValue <object>(prop)?.ToString();
                var currentValue  = change?.CurrentValues[prop]?.ToString();

                if (originalValue != currentValue)
                {
                    ChangeLog log = new ChangeLog()
                    {
                        EntityName      = entityName,
                        PrimaryKeyValue = primaryKey.ToString(),
                        PropertyName    = prop,
                        OldValue        = originalValue,
                        NewValue        = currentValue,
                        DateChanged     = DateTime.UtcNow,
                        ChangedBy       = HttpContext.Current.User.Identity.Name
                    };
                    ChangeLogs.Add(log);
                }
            }
        }

        return(base.SaveChanges());
    }
示例#6
0
    protected void Button4_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow row in this.GridView1.Rows)
        {
            ChangeLogs cl = new ChangeLogs("config", "ltrim(rtrim(str(ExpectNum)))");

            int ExpectNum = int.Parse(row.Cells[0].Text);
            cl.AddRecord(ExpectNum);
            int  num   = 0;
            bool blean = (row.FindControl("CheckBox1") as CheckBox).Checked;
            if (blean)
            {
                num = ReleaseBLL.Release(ExpectNum, 1);
            }
            else
            {
                num = ReleaseBLL.Release(ExpectNum, 0);
            }

            if (num > 0)
            {
                cl.AddRecord(ExpectNum);
                cl.ModifiedIntoLogs(ChangeCategory.company39, ExpectNum.ToString(), ENUM_USERTYPE.objecttype3);
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!") + "')</script>");
            }
            GetShopList();
        }
    }
示例#7
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string langugeName    = BLL.CommonClass.ValidData.InputText(this.txtLanguageName.Text.Trim());
        string languageRemark = BLL.CommonClass.ValidData.InputText(this.txtLanguageDesc.Text.Trim());

        if (langugeName == "")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("006641", "语言名不能为空!"));
            return;
        }
        if (languageRemark == "")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("006642", "语言描述不能为空!"));
            return;
        }

        int var = 0;

        Model.EnumOperateModel mode = (Model.EnumOperateModel)ViewState["mode"];
        if (mode == Model.EnumOperateModel.enum_Add)
        {
            var = BLL.other.Company.LanguageBLL.AddNewLanguage(langugeName, languageRemark);

            if (var > 0)
            {
                BLL.CommonClass.Transforms.JSExec("alert('" + GetTran("000006", "添加成功") + "');window.location.href='LanguageManage.aspx';");
            }
            else
            {
                BLL.CommonClass.Transforms.JSAlert(GetTran("000007", "添加失败"));
            }
        }
        else if (mode == Model.EnumOperateModel.enum_Edit)
        {
            ChangeLogs cl = new ChangeLogs("language", "ltrim(rtrim(str(ID)))");
            cl.AddRecord(ViewState["id"].ToString());
            int id = (int)ViewState["id"];
            var = BLL.other.Company.LanguageBLL.ModifyLanguage(id, langugeName, languageRemark);

            if (var > 0)
            {
                cl.AddRecord(ViewState["id"].ToString());
                cl.ModifiedIntoLogs(ChangeCategory.company35, Session["Company"].ToString(), ENUM_USERTYPE.objecttype9);
                BLL.CommonClass.Transforms.JSExec("alert('" + GetTran("000001", "修改成功") + "');window.location.href='LanguageManage.aspx';");
            }
            else
            {
                BLL.CommonClass.Transforms.JSAlert(GetTran("000002", "修改失败"));
            }
        }
    }
示例#8
0
 public ChangeLogForm(bool justUpdated)
 {
     InitializeComponent();
     if (justUpdated)
     {
         lblTitle.Text     = "Update applied!";
         richTextBox1.Text = ChangeLogs.GetChangeLogString();
         Text = "Update successfully applied.";
     }
     else
     {
         richTextBox1.Text = ChangeLogs.GetAllChangeLogsString();
     }
 }
示例#9
0
    /// <summary>
    /// 删除产品类
    /// </summary>
    /// <param name="id">产品ID</param>
    private void deleteFold(int id)
    {
        string productList = string.Empty;
        //检查某产品类是否发生了业务
        bool delFlag = AddNewProductBLL.CheckProductKindWheatherHasOperation(id, out productList);

        if (delFlag)
        {
            this.lblMessage.Text = GetTran("003256", "该产品类已有业务发生,因此不能删除!");
            return;
        }

        using (SqlConnection conn = new SqlConnection(DBHelper.connString))
        {
            conn.Open();
            using (SqlTransaction tran = conn.BeginTransaction())
            {
                try
                {
                    // before delete
                    ChangeLogs cl = new ChangeLogs("Product", "ltrim(rtrim(ProductID))");
                    cl.AddRecordtran(tran, id.ToString());

                    ///删除产品类以及该产品类所属的产品
                    AddNewProductBLL.DelProductKindByID(tran, productList);

                    cl.DeletedIntoLogstran(tran, ChangeCategory.company7, Session["Company"].ToString(), ENUM_USERTYPE.objecttype1);

                    ///提交事务
                    tran.Commit();
                }
                catch
                {
                    tran.Rollback();
                    lblMessage.Text = GetTran("003258", "产品类删除失败,请联系管理员!");
                    return;
                }
                finally
                {
                    conn.Close();
                    conn.Dispose();
                }
            }
        }

        this.lblMessage.Text = GetTran("003260", "产品类删除成功!");
    }
示例#10
0
    /// <summary>
    /// 保存联系信息
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSContact_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001541", "操作失败!") + "');", true);
            return;
        }
        if (string.IsNullOrEmpty(this.txtEmobile.Text.Trim()) && string.IsNullOrEmpty(this.Txtjtdh.Text.Trim()) && string.IsNullOrEmpty(this.Txtczdh.Text.Trim()) && string.IsNullOrEmpty(this.Txtbgdh.Text.Trim()))
        {
            Response.Write("<script>alert('" + GetTran("005992", "请至少填写一种电话联系方式!") + "');</script>");
            return;
        }

        GetPhone();
        ChangeLogs cl = new ChangeLogs("MemberInfo", "ltrim(rtrim(Number))");

        cl.AddRecord(ViewState["membernumberE"].ToString());
        MemberInfoModel info = new MemberInfoModel();

        info.Number     = ViewState["membernumberE"].ToString();
        info.MobileTele = Encryption.Encryption.GetEncryptionTele(this.txtEmobile.Text.ToString().Trim());
        info.HomeTele   = Encryption.Encryption.GetEncryptionTele(this.Txtjtdh.Text.ToString().Trim());
        info.FaxTele    = Encryption.Encryption.GetEncryptionTele(this.Txtczdh.Text.ToString().Trim());
        info.OfficeTele = Encryption.Encryption.GetEncryptionTele(this.Txtbgdh.Text.ToString().Trim());
        info.Email      = this.txtEemail.Text.ToString().Trim();

        if (MemInfoEditBLL.UpdmemContact(info))
        {
            cl.AddRecord(info.Number);
            cl.ModifiedIntoLogs(ChangeCategory.Order, info.Number, ENUM_USERTYPE.objecttype5);

            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001401", "操作成功!") + "');", true);
            this.btnSContact.Visible = false;
            this.btnCContact.Visible = false;
            this.btnEContact.Visible = true;
            SellblContact();
            return;
        }
        else
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001541", "操作失败!") + "');", true);
            return;
        }
    }
示例#11
0
    /// <summary>
    /// 删除指定产品
    /// </summary>
    /// <param name="id">产品ID</param>
    private void deleteItem(int id)
    {
        ///检查某产品是否放生了业务
        if (AddNewProductBLL.CheckProductWheatherHasOperation(id))
        {
            lblMessage.Text = GetTran("003252", "对不起,该产品已有业务发生,因此不能删除!");
            return;
        }

        using (SqlConnection conn = new SqlConnection(DBHelper.connString))
        {
            conn.Open();
            using (SqlTransaction tran = conn.BeginTransaction())
            {
                try
                {
                    // before delete
                    ChangeLogs cl = new ChangeLogs("Product", "ltrim(rtrim(ProductID))");
                    cl.AddRecordtran(tran, Convert.ToString(id));
                    //删除指定产品
                    AddNewProductBLL.DelProductByID(tran, id);

                    cl.DeletedIntoLogstran(tran, ChangeCategory.company7, Session["Company"].ToString(), ENUM_USERTYPE.objecttype1);
                    //提交事务
                    tran.Commit();
                }
                catch
                {
                    tran.Rollback();
                    lblMessage.Text = GetTran("003254", "产品删除失败,请联系管理员!");
                    return;
                }
                finally
                {
                    conn.Close();
                    conn.Dispose();
                }
            }
        }

        lblMessage.Text = GetTran("003255", "产品删除成功");
    }
示例#12
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "del")
     {
         Response.Cache.SetExpires(DateTime.Now);
         Permissions.CheckManagePermission(EnumCompanyPermission.FinanceDelTuihui);
         ChangeLogs cl = new ChangeLogs("ChongHong", "ltrim(rtrim(str(ID)))");
         cl.AddRecord(int.Parse(e.CommandArgument.ToString()));
         //获取当前选择的行
         GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
         //删除
         bool blean = ReleaseBLL.DelChongHong(int.Parse(e.CommandArgument.ToString()), double.Parse(row.Cells[4].Text), row.Cells[2].Text);
         if (blean)
         {
             cl.DeletedIntoLogs(ChangeCategory.company17, e.CommandArgument.ToString(), ENUM_USERTYPE.objecttype5);
             Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000749", "删除成功!") + "')</script>");
         }
         GetShopList();
     }
 }
示例#13
0
    /// <summary>
    /// 保存银行
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSBank_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        ChangeLogs cl = new ChangeLogs("MemberInfo", "ltrim(rtrim(Number))");

        cl.AddRecord(ViewState["membernumberE"].ToString());
        MemberInfoModel info = new MemberInfoModel();

        info.BankBook       = Encryption.Encryption.GetEncryptionName(this.lblEname.Text.ToString().Trim());
        info.Number         = ViewState["membernumberE"].ToString();
        info.BankCard       = Encryption.Encryption.GetEncryptionCard(this.txtEbanknumber.Text.ToString().Trim());
        info.BankAddress    = Encryption.Encryption.GetEncryptionAddress(this.txtEbankaddress.Text.ToString().Trim());
        info.Bankbranchname = this.txtEbank.Text.ToString().Trim();
        info.Bank.BankName  = this.DdlBank.SelectedValue.ToString().Trim();
        string Country  = this.CountryCityPCode2.Country;
        string Province = this.CountryCityPCode2.Province;
        string City     = this.CountryCityPCode2.City;

        info.BCPCCode = CommonDataDAL.GetCPCCode(Country, Province, City, CountryCityPCode2.Xian);
        if (MemInfoEditBLL.UpdmemBank(info))
        {
            cl.AddRecord(info.Number);
            cl.ModifiedIntoLogs(ChangeCategory.Order, info.Number, ENUM_USERTYPE.objecttype5);

            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001401", "操作成功!") + "');", true);
            this.btnSBank.Visible = false;
            this.btnCBank.Visible = false;
            this.btnEBank.Visible = true;
            SellblBank();
            return;
        }
        else
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001541", "操作失败!") + "');", true);
            return;
        }
    }
示例#14
0
        public override int SaveChanges()
        {
            //Do custom code
            // throw new Exception("override DbContext>SaveChanges working");
            // this.SaveChanges();


            var modifiedEntities = ChangeTracker.Entries()
                                   .Where(p => p.State == EntityState.Modified).ToList();
            var now = DateTime.UtcNow;

            foreach (var change in modifiedEntities)
            {
                var entityName = change.Entity.GetType().Name;
                var primaryKey = GetPrimaryKeyValue(change);

                foreach (var prop in change.OriginalValues.PropertyNames)
                {
                    var originalValue = change.OriginalValues[prop].ToString();
                    var currentValue  = change.CurrentValues[prop].ToString();
                    if (originalValue != currentValue)                     //Only create a log if the value changes
                    {
                        ChangeLog log = new ChangeLog()
                        {
                            EntityName      = entityName,
                            PrimaryKeyValue = primaryKey.ToString(),
                            PropertyName    = prop,
                            OldValue        = originalValue,
                            NewValue        = currentValue,
                            DateChanged     = now
                        };
                        ChangeLogs.Add(log);
                    }
                }
            }
            return(base.SaveChanges());
        }
示例#15
0
    //-------------------------保存
    /// <summary>
    /// 保存基本信息
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSbasic_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        string dirName = "";
        //string oldFilePath = this.fude.PostedFile.FileName.Trim();
        string oldFileName = "";
        string newFileName = "";
        string filepath = "";
        int    photoW = 0, photoH = 0;
        //string newFilePath = string.Empty;
        //try
        //{
        //    if (oldFilePath != string.Empty)
        //    {
        //        if (!Directory.Exists(Server.MapPath("Store\\H_image\\"))) //如果文件夹不存在则创建
        //        {
        //            Directory.CreateDirectory(Server.MapPath("Store\\H_image\\"));
        //        }

        //        //检查目录是否存在
        //        dirName = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString();

        //        oldFileName = System.IO.Path.GetFileName(oldFilePath);
        //        string fileExtName = string.Empty;
        //        try
        //        {
        //            fileExtName = System.IO.Path.GetExtension(oldFilePath);
        //        }
        //        catch
        //        {
        //            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000823", "上传文件格式不正确!") + "');", true);
        //            return;
        //        }


        //        if (fileExtName.ToLower() != ".icon" && fileExtName.ToLower() != ".jpg" && fileExtName.ToLower() != ".gif" && fileExtName.ToLower() != ".ico")
        //        {
        //            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('上传文件格式不正确,只能上传.icon、.jpg、.gif或者.ico格式的照片!');", true);
        //            return;
        //        }

        //        if (this.fude.PostedFile.ContentLength > 51200)
        //        {
        //            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000824", "上传文件不能大于50K!") + "');", true);
        //            return;
        //        }

        //        //System.Drawing.Image img = System.Drawing.Image.FromStream(fude.PostedFile.InputStream);
        //        //int width = img.Width;
        //        //int hight = img.Height;
        //        //if (width > 50 || hight > 50)
        //        //{
        //        //    Response.Write("<script>alert('" + GetTran("006034", "图片宽度和高度太大!") + "');</script>");
        //        //    this.Button1.Enabled = true;
        //        //    return "";
        //        //}
        //        System.Random rd = new Random(0);
        //        newFileName = DateTime.Now.Year.ToString() + rd.Next(10).ToString()
        //            + DateTime.Now.Month.ToString() + rd.Next(10).ToString()
        //            + DateTime.Now.Day.ToString() + rd.Next(10).ToString()
        //            + DateTime.Now.Second.ToString()
        //            + fileExtName;
        //        newFilePath = Server.MapPath("Store\\H_image\\") + newFileName;

        //        string LevelIcon = new MemberInfoModifyBll().GetMemberPhoto(this.txtEnumber.Text.ToString()) + "";
        //        if (System.IO.File.Exists(Server.MapPath(LevelIcon)))
        //        {
        //            System.IO.File.Delete(Server.MapPath(LevelIcon));
        //        }

        //        this.fude.PostedFile.SaveAs(newFilePath);
        //        try
        //        {
        //            System.Drawing.Image myIma = System.Drawing.Image.FromFile(newFilePath);
        //            photoH = myIma.Height;
        //            photoW = myIma.Width;

        //        }
        //        catch (Exception ex1)
        //        {
        //            if (System.IO.File.Exists(newFilePath))
        //            {
        //                System.IO.File.Delete(newFilePath);
        //            }
        //            Response.Write("<script>alert('" + GetTran("006895", "图片格式转换错误!") + "');</script>");
        //            return;
        //        }
        //        filepath = @"\Store\H_image\" + newFileName;
        //    }
        //}
        //catch (Exception ex1)
        //{
        //    return;
        //}



        MemberInfoModel model = new MemberInfoModel();

        BLL.Registration_declarations.RegistermemberBLL registermemberBLL = new BLL.Registration_declarations.RegistermemberBLL();
        if (this.txtEname.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000131", "对不起,会员姓名不能为空!") + "');", true);
            return;
        }
        if (this.txtEstore.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("006706", "对不起,购货店铺不能为空!") + "');", true);
            return;
        }
        if (!MemInfoEditBLL.GetStorenumber(this.txtEstore.Text.Trim()))
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("006707", "对不起,购货店铺编号不存在!") + "');", true);
            return;
        }
        //if (this.txtEcode.Text == "")
        //{
        //    System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000134", "对不起,邮编不能为空!") + "');", true);
        //    return;
        //}
        if (this.txtEnickname.Text == "")
        {
            this.txtEnickname.Text = this.txtEname.Text;
        }

        if (this.txtEidnumber.Text == "" && this.txtEIdtype.SelectedValue.Trim() != "P000")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000140", "对不起,证件号码不能为空!") + "');", true);
            return;
        }

        UserControl_CountryCityPCode ucontry = Page.FindControl("CountryCityPCode1") as UserControl_CountryCityPCode;
        DropDownList dllcountry = ucontry.FindControl("ddlCountry") as DropDownList;

        if (dllcountry.SelectedIndex == 0)
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000143", "请选择国家!") + "');", true);
            return;
        }

        DropDownList dllP = ucontry.FindControl("ddlP") as DropDownList;

        if (dllP.SelectedIndex == 0)
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000144", "请选择省份!") + "');", true);
            return;
        }
        DropDownList dllcity = ucontry.FindControl("ddlCity") as DropDownList;

        if (dllcity.SelectedIndex == 0)
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000145", "请选择城市!") + "');", true);
            return;
        }

        if (this.txtEaddress.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000146", "对不起,地址不能为空!") + "');", true);
            return;
        }
        //检查会员生日
        if (this.txtEIdtype.SelectedValue.Trim() != "P001")
        {
            if (registermemberBLL.CheckBirthDay(this.txtEbirthday.Text) == "error")
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + GetTran("000148", "对不起,请选择正确的出生日期!") + "');", true);

                return;
            }
        }
        //验证年龄是否大于18岁
        if (this.txtEIdtype.SelectedValue.Trim() != "P001")
        {
            string alert = registermemberBLL.AgeIs18(this.txtEbirthday.Text.Trim());
            if (alert != null)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + alert + "');", true);
                return;
            }
        }
        //检测身份证需要新方法
        string birthdaysex = "";

        if (this.txtEIdtype.SelectedValue.Trim() == "P001")
        {
            string result = BLL.Registration_declarations.CheckMemberInfo.CHK_IdentityCard(CommonDataBLL.quanjiao(this.txtEidnumber.Text.Trim()));
            if (result.IndexOf(",") <= 0)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + result + "');", true);
                return;
            }
            else
            {
                birthdaysex = result;
            }
        }
        string   Number   = this.txtEnumber.Text.ToString();
        string   Name     = Encryption.Encryption.GetEncryptionName(this.txtEname.Text.ToString().Trim());
        string   PetName  = this.txtEnickname.Text.ToString();
        DateTime Birthday = DateTime.Parse(this.txtEbirthday.Text.ToString());
        string   Country  = this.CountryCityPCode1.Country;
        string   Province = this.CountryCityPCode1.Province;
        string   City     = this.CountryCityPCode1.City;
        string   xian     = this.CountryCityPCode1.Xian;
        int      Sex      = 0;

        if (this.txtEIdtype.SelectedValue.Trim() == "P001")
        {
            Sex      = birthdaysex.Substring(birthdaysex.IndexOf(",") + 1).Trim() == GetTran("000094", "男") ? (1) : (0);
            Birthday = Convert.ToDateTime(birthdaysex.Substring(0, birthdaysex.IndexOf(",")));
            //验证年龄是否大于18岁
            string alert = registermemberBLL.AgeIs18(Birthday.ToString());
            if (alert != null)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + alert + "');", true);
                return;
            }
        }
        else
        {
            Birthday = DateTime.Parse(this.txtEbirthday.Text.ToString());

            if (this.txtEsex.SelectedValue.ToString() == "0")
            {
                Sex = 0;
            }
            else
            {
                Sex = 1;
            }
        }
        string     PostalCode = this.txtEcode.Text.ToString();
        ChangeLogs cl         = new ChangeLogs("MemberInfo", "ltrim(rtrim(Number))");

        cl.AddRecord(Number);
        MemberInfoModel info = new MemberInfoModel();

        info.Number     = Number;
        info.Name       = Name;
        info.PetName    = PetName;
        info.Birthday   = Birthday;
        info.Sex        = Sex;
        info.PostalCode = PostalCode;
        if (string.IsNullOrEmpty(filepath))
        {
            info.PhotoPath = ViewState["Ephtot"].ToString().Trim();
        }
        else
        {
            info.PhotoPath = filepath;
        }

        info.StoreID       = txtEstore.Text.ToString().Trim();
        info.Papertypecode = this.txtEIdtype.SelectedValue.ToString().Trim();
        info.PaperNumber   = Encryption.Encryption.GetEncryptionNumber(this.txtEidnumber.Text.ToString().Trim());
        info.CPCCode       = CommonDataDAL.GetCPCCode(Country, Province, City, xian);
        info.Address       = Encryption.Encryption.GetEncryptionAddress(this.txtEaddress.Text.ToString().Trim());
        info.BankBook      = Name;
        //BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("memberinfo", "ltrim(rtrim(number))");//申明日志对象

        if (MemInfoEditBLL.Updmemberbasic(info))
        {
            cl.AddRecord(info.Number);
            cl.ModifiedIntoLogs(ChangeCategory.Order, info.Number, ENUM_USERTYPE.objecttype5);

            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001401", "操作成功!") + "');", true);
            this.btnSbasic.Visible = false;
            this.btnCbasic.Visible = false;
            this.btnEbasic.Visible = true;
            SelLblBasic();
            return;
        }
        else
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("001541", "操作失败!") + "');", true);
            return;
        }
    }
示例#16
0
    protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Del")
        {
            ChangeLogs cl = new ChangeLogs("Remittances", "ltrim(rtrim(str(id)))");

            if (e.CommandArgument.ToString() == string.Empty)
            {
                return;
            }
            //得到更新的id
            //string updId = ((HtmlInputHidden)this.GridView1.SelectedRow.FindControl("HidId")).Value;
            GridViewRow gvrow = (GridViewRow)(((Image)e.CommandSource).NamingContainer);
            string      updId = (this.GridView2.Rows[gvrow.RowIndex].FindControl("HidId") as HtmlInputHidden).Value;
            //判断汇款是否被删除
            bool blean = RemittancesBLL.MemberIsExist(int.Parse(updId));
            if (blean == false)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000861", "不能重复删除!") + "')</script>");
                return;
            }
            cl.AddRecord(updId);

            if (updId == "" || updId == null)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000855", "参数出错!") + "')</script>");
                return;
            }
            //判断是否审核,不能删除已审核的单子
            Object obj = RemittancesBLL.IsMemberGSQR(int.Parse(updId));
            try
            {
                bool b = bool.Parse(obj.ToString());
                if (b == true)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000867", "不能删除已审核的单子!") + "')</script>");
                    return;
                }
            }
            catch
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000852", "类型转换错误!") + "')</script>");
                return;
            }
            //删除未审核的单子
            RemittancesBLL.DeleteMemberMoney(Convert.ToInt32(updId));
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000874", "成功删除!") + "')</script>");
            BtnConfirm_Click(null, null);
            cl.AddRecord(updId);
            cl.ModifiedIntoLogs(ChangeCategory.member1, updId, ENUM_USERTYPE.objecttype5);
        }
        else if (e.CommandName == "Pay")
        {
            string billid = EncryKey.GetEncryptstr(e.CommandArgument.ToString(), 2, 1);
            ScriptManager.RegisterStartupScript(this, GetType(), "mag", "var formobj=document.createElement('form');"
                                                + "formobj.action='../payserver/chosepay.aspx?blif=" + billid + "';" +
                                                "formobj.method='post';formobj.target='_blank';document.body.appendChild(formobj); formobj.submit();", true);
            //  Page.ClientScript.RegisterStartupScript(GetType(), null, "<script language='javascript'>window.open('../payserver/chosepay.aspx?blif=" + billid + "');</script>");
            return;
        }
    }
示例#17
0
    /// <summary>
    /// 提交
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (txtOldPassword.Text.Trim() != "" && txtNewPassword.Text.Trim() != "" && txtInputAgainNewPassword.Text.Trim() != "")
        {
            if (txtNewPassword.Text.Trim().Length < 4 || txtNewPassword.Text.Trim().Length > 10)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001787", "密码长度在4到10之间!")));
            }

            else
            {
                ///老密码加密
                string oldPass = Encryption.Encryption.GetEncryptionPwd(txtOldPassword.Text.Trim(), Session["Company"].ToString());

                ///通过管理员编号和登录密码获取行数
                int check = PassModifyBLL.GetCountByNumAndLoginPass(Session["Company"].ToString(), oldPass);
                if (check == 1)
                {
                    if (txtNewPassword.Text.Trim() == txtInputAgainNewPassword.Text.Trim())
                    {
                        ///新密码加密
                        string newPass = Encryption.Encryption.GetEncryptionPwd(txtNewPassword.Text.Trim(), Session["Company"].ToString());

                        string userid = Session["Company"].ToString().Trim();
                        // 添加修改记录日志
                        ChangeLogs cl      = new ChangeLogs("Manage", "Number");
                        string[]   columns = { "LoginPass" };

                        cl.AddRecord(userid, columns);

                        ///更改管理员登录密码
                        int updCount = PassModifyBLL.UpdManageLoginPass(Session["Company"].ToString().Trim(), newPass);

                        if (updCount > 0)
                        {
                            cl.AddRecord(userid, columns);
                            cl.ModifiedIntoLogs(ChangeCategory.company27, userid, ENUM_USERTYPE.objecttype6);

                            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001362", "密码修改成功!")));
                        }

                        else
                        {
                            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001790", "密码修改失败,请联系管理员!")));
                        }
                    }

                    else
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001792", "两次输入的新密码不一样!")));
                    }
                }

                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001794", "原密码错误!")));
                    return;
                }
            }
        }

        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001796", "原密码,新密码和确认新密码都不能为空!")));
            return;
        }
    }
示例#18
0
    protected void gvInfo_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string[] Arg     = Convert.ToString(e.CommandArgument).Split('_');
        string   DocID   = Arg[0];
        int      isExist = StorageInBrowseBLL.DocIdIsExistByDocId(DocID);

        //Exist
        if (isExist > 0)
        {
            if (e.CommandName == "Auditing")
            {
                int isAuditing = StorageInBrowseBLL.IsAuditingByDocId(DocID, 1);
                //Effective(In other words,Auditing)
                if (isAuditing > 0)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("006888", "该入库单已经被审核!")));
                }
                //No Auditing
                else
                {
                    string   DocAuditer   = CommonDataBLL.GetNameByAdminID(Session["Company"].ToString());
                    DateTime DocAuditTime = MYDateTime1.GetCurrentDateTime();
                    string   OperateIP    = CommonDataBLL.OperateIP;
                    string   OperateNum   = CommonDataBLL.OperateBh;

                    //更新公司库存
                    string TempWareHouseID = Arg[1];
                    int    changwei        = Convert.ToInt32(Arg[2]);
                    int    auditingCout    = StorageInBrowseBLL.checkDoc(DocAuditer, DocAuditTime, OperateIP, OperateNum, DocID, TempWareHouseID, changwei);
                    if (auditingCout > 0)
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>if(confirm('" + GetTran("002214", "入库单审核成功,是否要打印此入库单?") + "'))window.open('docPrint.aspx?DocID=" + DocID + "');</script>");
                    }

                    else
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("002216", "入库单审核失败,请联系管理员!")));
                        return;
                    }
                }
            }
            else if (e.CommandName == "NoEffect")
            {
                int isEffect = StorageInBrowseBLL.IsAuditingByDocId(DocID, 0);
                //No effect
                if (isEffect <= 0)
                {
                    DateTime CloseDate     = MYDateTime1.GetCurrentDateTime();
                    string   OperateIP     = CommonDataBLL.OperateIP;
                    string   OperateNum    = CommonDataBLL.OperateBh;
                    int      noEffectCount = StorageInBrowseBLL.updDocTypeName(CloseDate, DocID, OperateIP, OperateNum);
                    if (noEffectCount > 0)
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("002218", "此入库单审核无效成功!")));
                    }

                    else
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("002221", "此入库单审核无效失败,请联系管理员!")));
                    }
                }

                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("006890", "该入库单已经被审核无效!")));
                }
            }
            else if (e.CommandName == "Del")
            {
                ChangeLogs cl = new ChangeLogs("InventoryDoc", "DocID");
                cl.AddRecord(DocID);
                ChangeLogs cl2 = new ChangeLogs("InventoryDocDetails", "DocID");
                cl2.AddRecord(DocID);
                int delCount = StorageInBrowseBLL.delDoc(DocID);
                if (delCount > 0)
                {
                    cl.AddRecord(DocID);
                    cl.DeletedIntoLogs(ChangeCategory.company8, Session["Company"].ToString(), ENUM_USERTYPE.objecttype0);
                    cl2.AddRecord(DocID);
                    cl2.DeletedIntoLogs(ChangeCategory.company8, Session["Company"].ToString(), ENUM_USERTYPE.objecttype0);

                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("002225", "入库单删除成功!")));
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("002228", "入库单编辑失败,请联系管理员!")));
                    return;
                }
            }
            else if (e.CommandName == "Edit")
            {
                Response.Redirect("StorageInEdit.aspx?billID=" + DocID);
            }
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("006894", "该入库单不存在!")));
        }
        Btn_Search_Click(null, null);
    }
示例#19
0
        private void AddTimestamps()
        {
            var modifiedEntities = ChangeTracker.Entries()
                                   .Where(x => x.Entity is EntityBase && (x.State == EntityState.Added || x.State == EntityState.Modified)).ToList();

            foreach (var change in modifiedEntities)
            {
                var    now  = DateTime.Now; // current datetime
                string user = GetCurrentUserID();

                if (change.State == EntityState.Added)
                {
                    ((EntityBase)change.Entity).CreatedAt = now;
                    ((EntityBase)change.Entity).CreatedBy = user;
                    ((EntityBase)change.Entity).UpdatedAt = now;
                    ((EntityBase)change.Entity).UpdatedBy = user;
                }
                else
                {
                    var entityName     = change.Entity.GetType().Name;
                    var primaryKey     = GetPrimaryKeyValue(change);
                    var DatabaseValues = change.GetDatabaseValues();

                    foreach (var prop in change.OriginalValues.PropertyNames.Where(x => !x.Equals("UpdatedBy") && !x.Equals("UpdatedAt") && !x.Equals("CreatedBy") && !x.Equals("CreatedAt")))
                    {
                        //if (prop == "ItemID")
                        //{
                        //    //var x = DatabaseValues.GetValue<object>(prop).GetType();
                        //}

                        string originalValue = string.Empty;
                        string currentValue  = string.Empty;

                        if (DatabaseValues.GetValue <object>(prop) != null)
                        {
                            switch (Type.GetTypeCode(DatabaseValues.GetValue <object>(prop).GetType()))
                            {
                            case TypeCode.DateTime:
                                originalValue = string.Format("{0:yyyy-MM-dd}", DatabaseValues.GetValue <object>(prop));
                                break;

                            case TypeCode.Decimal:
                                originalValue = string.Format("{0:0.00}", DatabaseValues.GetValue <object>(prop));
                                break;

                            default:
                                originalValue = DatabaseValues.GetValue <object>(prop).ToString();
                                break;
                            }
                        }
                        if (change.CurrentValues[prop] != null)
                        {
                            switch (Type.GetTypeCode(change.CurrentValues[prop].GetType()))
                            {
                            case TypeCode.DateTime:
                                currentValue = string.Format("{0:yyyy-MM-dd}", change.CurrentValues[prop]);
                                break;

                            case TypeCode.Decimal:
                                currentValue = string.Format("{0:0.00}", change.CurrentValues[prop]);
                                break;

                            default:
                                currentValue = change.CurrentValues[prop].ToString();
                                break;
                            }
                        }
                        if (originalValue != currentValue) //Only create a log if the value changes
                        {
                            ChangeLogs.Add(new ChangeLog()
                            {
                                EntityName = entityName,
                                //NewValue = currentValue,
                                OldValue        = originalValue,
                                PrimaryKeyValue = int.Parse(primaryKey.ToString()),
                                UpdatedAt       = now,
                                UpdatedBy       = user,
                                PropertyName    = prop,
                            });
                        }
                    }
                    ((EntityBase)change.Entity).UpdatedAt = now;
                    ((EntityBase)change.Entity).UpdatedBy = user;
                }
            }
        }
示例#20
0
    /// <summary>
    /// 更新
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gvExpectNumDate_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        int EdCount = 0;

        ///修改期数时间权限
        EdCount = Permissions.GetPermissions(EnumCompanyPermission.SystemQishuVSdateEdit);

        if (EdCount.ToString() == "6222")
        {
            int    index     = e.RowIndex;
            string Date      = ((TextBox)gvExpectNumDate.Rows[index].FindControl("TextBox1")).Text.Trim();
            int    expectNum = Convert.ToInt32(gvExpectNumDate.Rows[index].Cells[0].Text.Trim());

            ChangeLogs    cl            = new ChangeLogs("config", "ltrim(rtrim(str(ExpectNum)))");
            CommonDataBLL commonDataBLL = new CommonDataBLL();

            cl.AddRecord(expectNum);

            try
            {
                string stardate = ((TextBox)gvExpectNumDate.Rows[index].FindControl("txtStar")).Text.Trim();
                string enddate  = ((TextBox)gvExpectNumDate.Rows[index].FindControl("txtEnd")).Text.Trim();

                if (Date == "" || stardate == "" || enddate == "")
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001720", "对不起,时间不能为空!")));
                    return;
                }

                else
                {
                    ///根据期数更改结算表中的日期
                    int updCount = SetDataOrExpectNumBLL.UpdDateByExpectNum(Date, expectNum, stardate, enddate);
                    if (updCount > 0)
                    {
                        cl.AddRecord(expectNum);
                        cl.ModifiedIntoLogs(ChangeCategory.company37, Session["Company"].ToString(), ENUM_USERTYPE.objecttype9);
                        Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001723", "修改时间成功!")));
                    }

                    else
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001727", "修改时间失败,请联系管理员!")));
                        return;
                    }

                    gvExpectNumDate.EditIndex = -1;
                    this.getInfo();
                }
            }
            catch
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001922", "日期格式有问题")));
                return;
            }
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001734", "对不起,您没有修改权限!")));
            return;
        }
    }
示例#21
0
 public void AddChangeLog(IssueChangeLog changeLog)
 {
     ChangeLogs.Add(new JIssueChangeLog(changeLog));
 }
示例#22
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        if (ViewState["ExpectNum"] == null || (int)ViewState["ExpectNum"] < 0 || (int)ViewState["ExpectNum"] > CommonDataBLL.GetMaxqishu())
        {
            return;
        }
        ConfigModel model = null;

        try
        {
            model           = new ConfigModel();
            model.ExpectNum = (int)ViewState["ExpectNum"];
            model.Para1     = float.Parse(this.txtPara1.Text);
            model.Para2     = float.Parse(this.txtPara2.Text);
            model.Para3     = float.Parse(this.txtPara3.Text);
            model.Para4     = float.Parse(this.txtPara4.Text);
            model.Para5     = float.Parse(this.txtPara5.Text);
            model.Para6     = float.Parse(this.txtPara6.Text);
            model.Para7     = float.Parse(this.txtPara7.Text);
            model.Para8     = float.Parse(this.txtPara8.Text);
            model.Para9     = float.Parse(this.txtPara9.Text);
            model.Para10    = float.Parse(this.txtPara10.Text);
            model.Para11    = float.Parse(this.txtPara11.Text);
            model.Para12    = float.Parse(this.txtPara12.Text);
            model.Para13    = float.Parse(this.txtPara13.Text);
            model.Para14    = float.Parse(this.txtPara14.Text);
            model.Para15    = float.Parse(this.txtPara15.Text);
            model.Para16    = float.Parse(this.txtPara16.Text);
            model.Para17    = float.Parse(this.txtPara17.Text);
            model.Para18    = float.Parse(this.txtPara18.Text);
            model.Para19    = float.Parse(this.txtPara19.Text);
            model.Para20    = float.Parse(this.txtPara20.Text);
            model.Para21    = double.Parse(this.txtPara21.Text);
            model.Para22    = double.Parse(this.txtPara22.Text);
            model.Para23    = double.Parse(this.txtPara23.Text);
            model.Para24    = double.Parse(this.txtPara24.Text);
            model.Para25    = double.Parse(this.txtPara25.Text);
            model.Para26    = double.Parse(this.txtPara26.Text);
            model.Para27    = double.Parse(this.txtPara27.Text);
            model.Para28    = double.Parse(this.txtPara28.Text);
            model.Para29    = double.Parse(this.txtPara29.Text);
        }
        catch (FormatException)
        {
            ScriptHelper.SetAlert(Page, GetTran("000969", "请输入数值"));
            InitPage();
            return;
        }
        if (CheckNum(model.Para1) && CheckNum(model.Para2) && CheckNum(model.Para3) && CheckNum(model.Para4) && CheckNum(model.Para5) && CheckNum(model.Para6) && CheckNum(model.Para7) && CheckNum(model.Para8) && CheckNum(model.Para9) && CheckNum(model.Para10) && CheckNum(model.Para11) && CheckNum(model.Para12) && CheckNum(model.Para13) && CheckNum(model.Para14) && CheckNum(model.Para15) && CheckNum(model.Para16) && CheckNum(model.Para17) && CheckNum(model.Para18) && CheckNum(model.Para1) && CheckNum(model.Para19) && CheckNum(model.Para20))
        {
        }
        else
        {
            ScriptHelper.SetAlert(Page, GetTran("001274", "请输入正数"));
            InitPage();
            return;
        }
        ChangeLogs cl = new ChangeLogs("tkconfig", "ExpectNum");

        cl.AddRecord((int)ViewState["ExpectNum"]);
        int n = ConfigSetBLL.UpdateConfig2(model);

        if (n == 1)
        {
            cl.ModifiedIntoLogs(ChangeCategory.company16, model.ExpectNum.ToString() + "期", ENUM_USERTYPE.objecttype3);
            ScriptHelper.SetAlert(Page, GetTran("000001", "修改成功") + "。");
        }
        else
        {
            ScriptHelper.SetAlert(Page, GetTran("000002", "修改失败") + "。");
        }
        InitPage();
    }
示例#23
0
    /// <summary>
    /// 添加和修改功能
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void but1_Click(object sender, EventArgs e)
    {
        DropDownList ddlCountry = (DropDownList)CountryUC.FindControl("ddlCountry");

        if (this.txtbank.Text.Trim().Length <= 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004092", "银行不能为空!") + "')</script>");
            return;
        }
        if (this.txtname.Text.Trim().Length <= 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004090", "开户名不能为空!") + "')</script>");
            return;
        }
        if (this.txtcard.Text.Trim().Length <= 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004089", "账号不能为空!") + "')</script>");
            return;
        }
        CompanyBankModel mode = new CompanyBankModel();

        mode.Bank      = this.txtbank.Text.Trim();
        mode.Bankname  = this.txtname.Text.Trim();
        mode.BankBook  = this.txtcard.Text.Trim();
        mode.CountryID = int.Parse(ddlCountry.SelectedItem.Value);
        //当为空时,此操作为添加;否则,修改操作
        if (ViewState["ID"] != null)
        {
            mode.ID = int.Parse(ViewState["ID"].ToString());

            string card = ViewState["bnakbook"].ToString();
            //修改账号
            ChangeLogs cl = new ChangeLogs("companybank", "ltrim(rtrim(str(id)))");
            cl.AddRecord(mode.ID);
            if (CompanyBankBLL.UpdCompanyBank(mode) == 1)
            {
                cl.AddRecord(mode.ID);
                cl.ModifiedIntoLogs(ChangeCategory.company13, Session["Company"].ToString(), ENUM_USERTYPE.objecttype3);
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004086", "修改账户成功!") + "')</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004084", "修改账户失败!") + "')</script>");
            }
        }
        else  //添加
        {
            //验证账号
            if (CompanyBankBLL.ValidateCompanyBank(mode))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004083", "此账号已存在!!!") + "')</script>");
                return;
            }
            else
            {
                //添加账户
                if (CompanyBankBLL.AddCompanyBank(mode))
                {
                    ViewState["ID"] = null;
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("004081", "帐户添加成功!") + "')</script>");
                }
            }
        }
        this.TranControls(this.but1, new string[][] { new string[] { "002047", "添 加" } });
        this.txtcard.Text = string.Empty;
        ViewState["ID"]   = null;
        bindcontrol(null, null);
    }
示例#24
0
    /// <summary>
    /// 批量处理
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btn_listsubmit_Click(object sender, EventArgs e)
    {
        try
        {
            int ret = 0;

            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                CheckBox chb = (CheckBox)GridView1.Rows[i].FindControl("chb") as CheckBox;

                LinkButton LinkButton1 = (LinkButton)GridView1.Rows[i].FindControl("LinkButton1") as LinkButton;
                LinkButton LinkButton2 = (LinkButton)GridView1.Rows[i].FindControl("LinkButton2") as LinkButton;
                LinkButton LinkButton3 = (LinkButton)GridView1.Rows[i].FindControl("LinkButton3") as LinkButton;
                string[]   args        = null;
                args = LinkButton1.ToolTip.ToString().Split(',');
                string        numebr     = args[0].ToString();
                string        isAuditing = args[1].ToString();
                int           id         = Convert.ToInt32(args[2].ToString());
                double        money      = Convert.ToDouble(args[3].ToString());
                int           bz         = Convert.ToInt32(args[2].ToString());
                WithdrawModel wDraw      = new WithdrawModel();
                wDraw.Id     = id;
                wDraw.Number = numebr;
                wDraw.ApplicationExpecdtNum = BLL.CommonClass.CommonDataBLL.getMaxqishu();
                wDraw.WithdrawMoney         = money;
                wDraw.AuditExpectNum        = BLL.CommonClass.CommonDataBLL.getMaxqishu();
                wDraw.AuditingIP            = BLL.CommonClass.CommonDataBLL.OperateIP;
                wDraw.AuditingManageId      = BLL.CommonClass.CommonDataBLL.OperateBh;
                wDraw.AuditTime             = DateTime.Now.ToUniversalTime();
                wDraw.Wyj = bz;
                //已汇出
                if (rad_list.SelectedValue == "1" && chb.Checked == true && LinkButton1.Visible == true)
                {
                    if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 2)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007176", "的该申请单已经审核,不可以重复审核!") + "')</script>");
                        this.BtnConfirm_Click(null, null);
                        break;
                    }

                    if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007177", "该申请单已经被删除!") + "')</script>");
                        this.BtnConfirm_Click(null, null);
                        break;
                    }

                    double leftMoney = Convert.ToDouble(BLL.CommonClass.CommonDataBLL.GetLeftMoney1(numebr));
                    if (money > leftMoney)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007175", "可提现余额不足,不能审核!") + "')</script>");
                        break;
                    }
                    Application.Lock();
                    bool isSure = false;

                    isSure = BLL.Registration_declarations.RegistermemberBLL.AuditWithdraw(wDraw);

                    Application.UnLock();
                    if (isSure)
                    {
                        ret = 1;
                    }
                    else
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("006041", "审核失败!") + "')</script>");
                        break;
                    }
                }//账户出错
                else if (rad_list.SelectedValue == "2" && chb.Checked == true && LinkButton2.Visible == true)
                {
                    if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 2)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007181", "该申请单已经审核,不可以转成账号错误!") + "');</script>");
                        break;
                    }
                    if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 3)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007180", "该申请单已经是账号错误,不可以重复账号错误!") + "');</script>");
                        break;
                    }

                    if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007179", "该申请单已经删除,不可以转成账号错误!") + "')</script>");
                        this.BtnConfirm_Click(null, null);
                        break;
                    }

                    ChangeLogs cl = new ChangeLogs("MemberCash", "ltrim(rtrim(str(id)))");
                    cl.AddRecord(wDraw.Id);
                    Application.Lock();
                    bool isSure = BLL.Registration_declarations.RegistermemberBLL.updateCardEorror(wDraw.Id, wDraw.WithdrawMoney, wDraw.Number);
                    Application.UnLock();
                    if (isSure)
                    {
                        cl.AddRecord(wDraw.Id);
                        cl.DeletedIntoLogs(ChangeCategory.company14, Session["Company"].ToString(), ENUM_USERTYPE.objecttype5);
                        ret = 1;
                    }
                    else
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("001541", "操作失败!)") + "')</script>");
                        break;
                    }
                }//开始处理
                else if (rad_list.SelectedValue == "3" && chb.Checked == true && LinkButton3.Visible == true)
                {
                    if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 1)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007182", "该申请单已经审核,不可以在开始处理!") + "');</script>");
                        break;
                    }
                    if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 2)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007183", "该申请单已经开始处理,不可以在开始处理!") + "');</script>");
                        break;
                    }
                    if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 3)
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007184", "该申请单已经是账号错误,不可以在开始处理!") + "');</script>");
                        break;
                    }

                    if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("007185", "该申请单已经删除,不可以在开始处理!") + "')</script>");
                        this.BtnConfirm_Click(null, null);
                        break;
                    }

                    ChangeLogs cl = new ChangeLogs("MemberCash", "ltrim(rtrim(str(id)))");
                    cl.AddRecord(wDraw.Id);
                    Application.Lock();
                    bool isSure = BLL.Registration_declarations.RegistermemberBLL.updateKscl(wDraw.Id);
                    Application.UnLock();
                    if (isSure)
                    {
                        cl.AddRecord(wDraw.Id);
                        cl.DeletedIntoLogs(ChangeCategory.company14, Session["Company"].ToString(), ENUM_USERTYPE.objecttype5);
                        ret = 1;
                    }
                    else
                    {
                        ret = -1;
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007829", "编号为") + id + GetTran("001541", "操作失败!") + "')</script>");
                        break;
                    }
                }
            }

            if (rad_list.SelectedValue == "1" && ret == 0)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007834", "选项中没有需要已汇出的选项") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
            else if (rad_list.SelectedValue == "2" && ret == 0)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007835", "选项中没有账户错误的选项") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
            else if (rad_list.SelectedValue == "3" && ret == 0)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007836", "选项中没有开始处理的选项") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }

            if (ret > 0)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
        }
        catch
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001541", "操作失败!") + "')</script>");
            return;
        }
    }
示例#25
0
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        #region 验证用户输入
        if (txtBianhao.Text.Trim() == "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert(\"" + GetTran("001607", "请输入收件人编号") + "!!!\");</script>");

            return;
        }
        if (txtTitle.Text.Trim() == "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001609", "请输入标题") + "!!!');</script>");

            Literal1.Text = "";
            return;
        }
        if (this.content1.Value.Trim().Length.Equals(0))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("kwl", "请输入公告内容") + "!!!');</script>");

            return;
        }
        if (this.content1.Value.Trim().Length > 4000)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000863", "您输入的信息过长") + "!!!');</script>");

            return;
        }
        double from = 0;
        double to   = 0;
        if (this.ChkBonus.Checked)
        {
            if (string.IsNullOrEmpty(this.TxtBonusFrom.Text.Trim()))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert(' 起始奖金不能为空!');</script>");
                return;
            }
            if (string.IsNullOrEmpty(this.TxtBonusTo.Text.Trim()))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert(' 未尾奖金不能为空!');</script>");
                return;
            }
            try
            {
                from = Convert.ToDouble(this.TxtBonusFrom.Text.Trim());
                to   = Convert.ToDouble(this.TxtBonusTo.Text.Trim());
                if (from <= 0)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert(' 起始奖金不能为负数!');</script>");
                    return;
                }
                if (from <= 0)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert(' 未尾奖金不能负数!');</script>");
                    return;
                }
            }
            catch
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("kwl", "您输入的奖金区间无效") + "!!!');</script>");
                return;
            }
            if (from >= to)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("kwl", "您输入的奖金区间无效") + "!!!');</script>");
                return;
            }
        }

        if (this.drop_LoginRole.SelectedValue.Equals("2") && this.ChkNet.Checked)
        {
            if (this.TxtLeader.Text.Trim().Length.Equals(0))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("kwl", "请指定团队领导人编号") + "!!!');</script>");
                return;
            }
            else
            {
                if (!MessageSendBLL.CheckNumber(2, this.TxtLeader.Text.Trim()))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("kwl", "指定的团队领导人不存在") + "!!!');</script>");
                    return;
                }
            }
        }
        #endregion
        StringBuilder sb = new StringBuilder();

        if (Request["Id"] != null)
        {
            int id = Convert.ToInt32(Request["Id"]);

            ChangeLogs cl = new ChangeLogs("MessageSend", "ltrim(rtrim(id))");
            cl.AddRecord(id);

            ChangeLogs clsend = new ChangeLogs("MessageReceive", "ltrim(rtrim(messagesendid))");
            clsend.AddRecord(id);


            BLL.other.Company.MessageReceiveBLL bll = new MessageReceiveBLL();
            bll.delGongGao(id);

            cl.ModifiedIntoLogs(ChangeCategory.company19, Session["Company"].ToString(), ENUM_USERTYPE.objecttype10);
            clsend.ModifiedIntoLogs(ChangeCategory.company19, Session["Company"].ToString(), ENUM_USERTYPE.objecttype10);

            this.btn_Save.Text = GetTran("000259", "修改");
            sb.Append(GetTran("001621", "公告修改"));
        }
        else
        {
            sb.Append(GetTran("001620", "公告发布"));
        }
        MessageSendModel messagesend = new MessageSendModel();

        //messagesend.Content = TextBox1.Text.Trim();
        messagesend.Content   = this.content1.Value.Trim();
        messagesend.DropFlag  = 0;
        messagesend.InfoTitle = txtTitle.Text.Trim().Replace("<", "&lt;").Replace(">", "&gt;");
        messagesend.LoginRole = drop_LoginRole.SelectedItem.Value;
        messagesend.ReadFlag  = 0;

        messagesend.Sender     = Session["Company"].ToString();
        messagesend.SenderRole = "0";
        messagesend.Receive    = "*";

        messagesend.CountryCode  = this.DropDownList1.SelectedValue;
        messagesend.LanguageCode = this.DropDownList2.SelectedValue;
        //if (this.ChkLevel.Checked)
        //{
        //    messagesend.ConditionLevel = Convert.ToInt16(this.DropLevel.SelectedValue);
        //}
        //else
        //{
        //    messagesend.ConditionLevel = -1;
        //}
        if (this.ChkBonus.Checked)
        {
            messagesend.ConditionBonusFrom = Convert.ToDouble(this.TxtBonusFrom.Text.Trim());
            messagesend.ConditionBonusTo   = Convert.ToDouble(this.TxtBonusTo.Text.Trim());
        }
        else
        {
            messagesend.ConditionBonusFrom = -1;
            messagesend.ConditionBonusTo   = -1;
        }
        if (this.ChkNet.Checked)
        {
            messagesend.ConditionRelation = Convert.ToChar(this.DropRelation.SelectedValue);
            messagesend.ConditionLeader   = this.TxtLeader.Text.Trim();
        }
        else
        {
            messagesend.ConditionLeader   = "";
            messagesend.ConditionRelation = '0';
        }
        messagesend.Qishu       = CommonDataDAL.getMaxqishu();
        messagesend.MessageType = 'a';
        if (MessageSendBLL.Addsendaffiche(messagesend))
        {
            BLL.other.Company.MessageReceiveBLL bll = new MessageReceiveBLL();

            if (this.drop_LoginRole.SelectedValue == "1")
            {
                bll.UpdateStore();
            }
            else if (this.drop_LoginRole.SelectedValue == "2")
            {
                bll.UpdateMember();
            }

            sb.Append(GetTran("001600", "成功") + "!!!");
            ScriptHelper.SetAlert(Page, sb.ToString());
        }
        else
        {
            sb.Append(GetTran("001618", "失败"));
            ScriptHelper.SetAlert(Page, sb.ToString());
        }

        txtTitle.Text  = "";
        TextBox1.Text  = "";
        content1.Value = "";
    }
示例#26
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        ConfigModel model = null;

        //decimal mrmin=300;
        //decimal mrmax=30000;
        //decimal mcmin=300;
        //decimal mcmax=30000;
        //decimal mrzs = 0.5m;
        try
        {
            model           = new ConfigModel();
            model.ExpectNum = (int)ViewState["ExpectNum"];
            model.Para1     = double.Parse(this.txtPara1.Text);
            model.Para2     = double.Parse(this.txtPara2.Text);
            model.Para3     = double.Parse(this.txtPara3.Text);
            model.Para4     = double.Parse(this.txtPara4.Text);
            model.Para5     = double.Parse(this.txtPara5.Text);
            model.Para6     = double.Parse(this.txtPara6.Text);
            model.Para7     = double.Parse(this.txtPara7.Text);
            model.Para8     = double.Parse(this.txtPara8.Text);
            model.Para9     = double.Parse(this.txtPara9.Text);
            model.Para10    = double.Parse(this.txtPara10.Text);
            model.Para11    = double.Parse(this.txtPara11.Text);
            model.Para12    = double.Parse(this.txtPara12.Text);
            model.Para13    = double.Parse(this.txtPara13.Text);
            model.Para14    = double.Parse(this.txtPara14.Text);
            model.Para15    = double.Parse(this.txtPara15.Text);
            model.Para16    = double.Parse(this.txtPara16.Text);

            model.Para17 = double.Parse(this.txtPara17.Text);
            model.Para18 = double.Parse(this.txtPara18.Text);
            model.Para19 = double.Parse(this.txtPara19.Text);

            model.Para20 = double.Parse(this.txtPara20.Text);
            model.Para21 = double.Parse(this.txtPara21.Text);
            model.Para22 = double.Parse(this.txtPara22.Text);
            model.Para23 = double.Parse(this.txtPara23.Text);
            model.Para24 = double.Parse(this.txtPara24.Text);
            model.Para25 = double.Parse(this.txtPara25.Text);
            model.Para26 = double.Parse(this.txtPara26.Text);
            model.Para27 = double.Parse(this.txtPara27.Text);
            model.Para28 = double.Parse(this.txtPara28.Text);
            model.Para29 = double.Parse(this.txtPara29.Text);
        }
        catch (FormatException)
        {
            ScriptHelper.SetAlert(Page, GetTran("000969", "请输入数值"));
            InitPage();
            return;
        }
        if (CheckNum(model.Para1) && CheckNum(model.Para2) && CheckNum(model.Para3) && CheckNum(model.Para4) && CheckNum(model.Para5) &&
            CheckNum(model.Para6) && CheckNum(model.Para7) && CheckNum(model.Para8) && CheckNum(model.Para9) && CheckNum(model.Para10) &&
            CheckNum(model.Para11) && CheckNum(model.Para12) && CheckNum(model.Para13) && CheckNum(model.Para14) && CheckNum(model.Para15) &&
            CheckNum(model.Para16) && CheckNum(model.Para17) && CheckNum(model.Para18) && CheckNum(model.Para19))
        {
        }
        else
        {
            ScriptHelper.SetAlert(Page, GetTran("001274", "请输入正数"));
            InitPage();
            return;
        }
        ChangeLogs cl = new ChangeLogs("config", "ExpectNum");

        cl.AddRecord((int)ViewState["ExpectNum"]);
        int n = ConfigSetBLL.UpdateConfig(model);

        //SqlParameter[] paras = new SqlParameter[]{
        //      new SqlParameter("@Para1",mrmin),
        //      new SqlParameter("@Para2",mrmax),
        //      new SqlParameter("@Para3",mcmin),
        //      new SqlParameter("@Para4",mcmax),
        //      new SqlParameter("@Para5",mrzs),
        //    };
        //string sql = @"UPDATE jykz SET mrMinjf =@Para1,mrMaxjf=@Para2,mcMinjf=@Para3,mcMaxjf=@Para4,Mrzs=@Para5";
        //int m = DBHelper.ExecuteNonQuery(sql, paras, CommandType.Text);
        if (n == 1)
        {
            cl.ModifiedIntoLogs(ChangeCategory.company15, GetTran("000156", "第") + model.ExpectNum.ToString() + GetTran("000157", "期"), ENUM_USERTYPE.objecttype3);
            ScriptHelper.SetAlert(Page, GetTran("000001", "修改成功"));
        }
        else
        {
            ScriptHelper.SetAlert(Page, GetTran("000002", "修改失败") + "。");
        }
        InitPage();
    }
示例#27
0
    protected void doAddButtton_Click(object sender, EventArgs e)
    {
        //图片大小
        int upPhotoLength = 0;

        byte[] ImageContent = new Byte[upPhotoLength];
        int    intStatus    = 0;
        //获取上传的文件名
        string fileName = this.UpPhotos.FileName;
        //获取物理路径
        string strImageType = string.Empty;
        Stream PhotoStream  = null;

        //当包含文件时(即上传有文件)
        if (UpPhotos.HasFile)
        {
            //为0表示被上传的图片的类型不符合要求,1表示符合要求
            int            ImageType = 0;
            HttpPostedFile upPhoto   = UpPhotos.PostedFile;
            upPhotoLength = upPhoto.ContentLength;
            if (upPhotoLength > 1024000)
            {
                this.lblMessage.Text = GetTran("004073", "产品图片的大小请限制在300K之内") + "...";
                return;
            }
            //获取上传文件的扩展名
            strImageType = Path.GetExtension(fileName).ToLower();
            String[] Extensions = { ".gif", ".png", ".jpeg", ".jpg", ".bmp", ".pdf" };
            for (int i = 0; i < Extensions.Length; i++)
            {
                if (strImageType == Extensions[i])
                {
                    //图片类型
                    strImageType = Extensions[i];
                    ImageType    = 1;
                }
            }

            if (ImageType == 1)
            {
                try
                {
                    PhotoStream  = upPhoto.InputStream;
                    ImageContent = new Byte[upPhotoLength];
                    intStatus    = PhotoStream.Read(ImageContent, 0, upPhotoLength);
                }
                catch
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("004076", "上传图片失败,请联系管理员!")));
                    return;
                }
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("004079", "请检查图片类型!")));
                return;
            }
        }

        string productType = uclProductType.SelectedValue;
        string typeName    = txtProductType.Text.Trim();

        //添加类
        bool isFold = this.addClass.Checked;

        //大单位
        int bignumber = 0;

        ///长、宽、高
        decimal Length = 0, Width = 0, High = 0;

        ///重量
        decimal Weight = 0;

        ///验证预警数量
        int alertCount = 0;

        ///价格和积分
        decimal costPrice = 0, commonPrice = 0, commonPV = 0, preferentialPrice = 0, preferentialPV = 0;


        ///验证产品信息
        if (!isFold)
        {
            //判断产品名称是否为空
            if (txtProductName.Text.Trim() == "")
            {
                this.lblMessage.Text = GetTran("004082", "名称不能为空!");
                return;
            }

            ///产品编码
            if (this.txtProductCode.Text.Trim() == "")
            {
                this.lblMessage.Text = GetTran("004085", "产品编码不能为空!");
                return;
            }

            ///判断产品编码是否重复
            else
            {
                ///添加产品
                if (editingID == 0)
                {
                    //获取编码的数目
                    int proCodeCount = AddNewProductBLL.CheckProductCodeIsExist(this.txtProductCode.Text.Trim());
                    if (proCodeCount > 0)
                    {
                        lblMessage.Text = GetTran("004088", "对不起,编码重复!");
                        return;
                    }
                }

                ///修改产品
                else
                {
                    ///获取行数,判断编码是否存在
                    int proCodeCount = AddNewProductBLL.CheckProductCodeIsExistByID(this.txtProductCode.Text.Trim(), Convert.ToInt32(this.editingID));
                    if (proCodeCount > 0)
                    {
                        lblMessage.Text = GetTran("004088", "对不起,编码重复!");
                        return;
                    }
                }
            }

            ///验证产品型号
            if (this.txtProductType.Text.Trim() == "")
            {
                this.lblMessage.Text = GetTran("004091", "产品型号不能为空!");
                return;
            }

            if (txtCostPrice.Text.Trim() == "")
            {
                costPrice = 0;
            }

            if (txtCommonPrice.Text.Trim() == "")
            {
                commonPrice = 0;
            }

            if (txtPreferentialPrice.Text.Trim() == "")
            {
                preferentialPrice = 0;
            }

            if (txtCommonPV.Text == "")
            {
                commonPV = 0;
            }

            if (txtPreferentialPV.Text == "")
            {
                preferentialPV = 0;
            }

            if (txtCostPrice.Text.Trim() != "" || txtCommonPrice.Text.Trim() != "" || txtCommonPV.Text.Trim() != "" || txtPreferentialPV.Text.Trim() != "" || txtPreferentialPrice.Text.Trim() != "")
            {
                try
                {
                    costPrice         = Convert.ToDecimal(this.txtCostPrice.Text.Trim());
                    commonPrice       = Convert.ToDecimal(this.txtCommonPrice.Text.Trim());
                    commonPV          = Convert.ToDecimal(this.txtCommonPV.Text.Trim());
                    preferentialPrice = Convert.ToDecimal(this.txtPreferentialPrice.Text.Trim());
                    preferentialPV    = Convert.ToDecimal(this.txtPreferentialPV.Text.Trim());
                }
                catch
                {
                    this.lblMessage.Text = GetTran("004093", "请正确输入价格,积分!");
                    return;
                }

                if (costPrice < 0 || commonPrice < 0 || commonPV < 0 || preferentialPrice < 0 || preferentialPV < 0)
                {
                    this.lblMessage.Text = GetTran("004094", "请注意,价格,积分不能为负数!");
                    return;
                }
            }

            ///验证大单位
            if (uclProductBigUnit.SelectedItemText == "")
            {
                this.lblMessage.Text = GetTran("004095", "大单位名称不能为空!");
                return;
            }

            ///验证小单位
            if (uclProductSmallUnit.SelectedItemText == "")
            {
                this.lblMessage.Text = GetTran("004096", "小单位名称不能为空!");
                return;
            }

            ///大小单位比例
            if (txtBigSmallMultiple.Text.Trim() == "")
            {
                this.lblMessage.Text = GetTran("004098", "大小单位比例不能为空!");
                return;
            }

            else
            {
                try
                {
                    bignumber = Convert.ToInt32(txtBigSmallMultiple.Text);
                }
                catch
                {
                    lblMessage.Text = GetTran("004100", "对不起,大小单位转换必须是整数!");
                    return;
                }

                if (bignumber <= 0)
                {
                    lblMessage.Text = GetTran("004101", "对不起,大小单位转换必须是大于或等于1的整数!");
                    return;
                }
            }


            Length = 0;
            Width  = 0;
            High   = 0;

            ///验证重量
            if (txtWeight.Text.Trim() == "")
            {
                this.lblMessage.Text = GetTran("004104", "对不起,重量不能为空!");
                return;
            }

            else
            {
                try
                {
                    Weight = Convert.ToDecimal(txtWeight.Text.Trim());
                }

                catch
                {
                    this.lblMessage.Text = GetTran("004106", "请正确输入重量!");
                    return;
                }

                if (Weight < 0)
                {
                    this.lblMessage.Text = GetTran("004107", "对不起,重量必须大于或等于0!");
                    return;
                }
            }

            ///验证预警数量
            if (txtAlertnessCount.Text.Trim() != "")
            {
                try
                {
                    alertCount = Convert.ToInt32(txtAlertnessCount.Text);
                }
                catch
                {
                    this.lblMessage.Text = GetTran("004108", "对不起,预警数量必须是整数!");
                    return;
                }

                if (alertCount < 0)
                {
                    this.lblMessage.Text = GetTran("004109", "对不起,预警数量必须是大于或等于0的整数!");
                    return;
                }
            }
        }

        ///产品说明
        if (txtDescription.Text.Length > 200)
        {
            this.lblMessage.Text = GetTran("004110", "产品说明不能超过两百字!");
            return;
        }

        string productName = this.txtProductName.Text.Trim();

        ///判断产品类名称是否为空
        if (isFold && productName == "")
        {
            this.lblMessage.Text = GetTran("004082", "名称不能为空!");
            return;
        }

        ///为了和后面的说明区别,故命名为productDescription(2009-10-22)
        string productDescription = ValidData.InputText(this.txtDescription.Text.Trim());
        string productSpec        = uclProductSpec.SelectedValue;
        string productColor       = uclProductColor.SelectedValue;
        string productStatus      = uclProductStatus.SelectedValue;
        string productSexType     = uclProductSexType.SelectedValue;
        string productArea        = ValidData.InputText(txtProductArea.Text.Trim());
        string productSize        = uclProductSize.SelectedValue;
        string productBigUnit     = uclProductBigUnit.SelectedValue;
        string productSmallUnit   = uclProductSmallUnit.SelectedValue;

        string strMessage;

        //On sale
        int isSell = 0;


        if (this.ChboxHide.Checked == true)
        {
            isSell = 0;
        }

        //No sale
        if (this.ChboxHide.Checked == false)
        {
            isSell = 1;
        }

        #region 产品新增部分[详细、允许销售的团队人数] xyc
        int    detailsMaxLenth = 200000;
        string details_TX      = Request.Form["txtDetails"] == null ? "" : Request.Form["txtDetails"].ToString();
        details_TX = ValidData.RemoveScript(details_TX);
        //if (details_TX.Length > detailsMaxLenth)
        //{
        //    Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("详细内容过多,请适当减少产品的详细描述内容!"));
        //    return;
        //}
        productModel.Details_TX = details_TX;
        int onlyForGroup = 0;
        if (this.rbtnN.Checked == true)
        {
            onlyForGroup = 0;
        }
        else if (this.rbtnY.Checked == true)
        {
            onlyForGroup = 1;
        }
        productModel.OnlyForGroup_NR = onlyForGroup;
        Regex rx = new Regex(@"[;|;]", RegexOptions.IgnoreCase);
        this.txt_GroupIDS_AZ_TX.Text = rx.Replace(this.txt_GroupIDS_AZ_TX.Text, ";");
        this.txt_GroupIDS_TJ_TX.Text = rx.Replace(this.txt_GroupIDS_TJ_TX.Text, ";");
        string GroupIDS_AZ_TX = this.txt_GroupIDS_AZ_TX.Text;
        string GroupIDS_TJ_TX = this.txt_GroupIDS_TJ_TX.Text;
        Regex  rx0            = new Regex(@"\w|;]+", RegexOptions.IgnoreCase);
        if (!string.IsNullOrEmpty(GroupIDS_AZ_TX) && !rx0.IsMatch(GroupIDS_AZ_TX))
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("格式错误,多安置团队顶点编号请用分号隔开!"));
            return;
        }
        if (!string.IsNullOrEmpty(GroupIDS_TJ_TX) && !rx0.IsMatch(GroupIDS_TJ_TX))
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("多推荐团队顶点编号请用分号隔开!"));
            return;
        }
        if (onlyForGroup == 1)
        {
            if (string.IsNullOrEmpty(GroupIDS_AZ_TX) && string.IsNullOrEmpty(GroupIDS_TJ_TX))
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("请填写允许销售的团队顶点编号!"));
                return;
            }
            else
            {
                #region 对会员编号的真实性进行验证
                //验证编号是否存在
                bool          bhValidate = true;
                string        notExistID = string.Empty;
                string[]      bhsAZ      = rx.Split(GroupIDS_AZ_TX);
                string[]      bhsTJ      = rx.Split(GroupIDS_TJ_TX);
                List <string> group_ids  = new List <string>();
                foreach (string s in bhsAZ)
                {
                    if (!string.IsNullOrEmpty(s))
                    {
                        group_ids.Add(s);
                    }
                }
                foreach (string s in bhsTJ)
                {
                    if (!group_ids.Contains(s))
                    {
                        if (!string.IsNullOrEmpty(s))
                        {
                            group_ids.Add(s);
                        }
                    }
                }

                MemberInfoModel member = null;
                foreach (string s in group_ids)
                {
                    member = MemberInfoModifyBll.getMemberInfo(s);
                    if (member == null)
                    {//不存在
                        bhValidate  = false;
                        notExistID += s + ",";
                    }
                }
                if (notExistID != string.Empty)
                {
                    notExistID = notExistID.Substring(0, notExistID.Length - 1);
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('会员[" + notExistID + "]不存在!');</script>", false);
                    return;
                }
                #endregion
            }
        }
        productModel.GroupIDS_AZ_TX = GroupIDS_AZ_TX;
        productModel.GroupIDS_TJ_TX = GroupIDS_TJ_TX;
        #endregion

        productModel.IsFold      = Convert.ToInt32(isFold);
        productModel.ProductName = productName;
        if (!isFold)
        {
            productModel.ProductTypeID = Convert.ToInt32(productType);

            productModel.ProductTypeName    = typeName;
            productModel.ProductSpecID      = Convert.ToInt32(productSpec);
            productModel.ProductColorID     = Convert.ToInt32(productColor);
            productModel.ProductSizeID      = Convert.ToInt32(productSize);
            productModel.ProductSexTypeID   = Convert.ToInt32(productSexType);
            productModel.ProductStatusID    = Convert.ToInt32(productStatus);
            productModel.BigProductUnitID   = Convert.ToInt32(productBigUnit);
            productModel.SmallProductUnitID = Convert.ToInt32(productSmallUnit);
            productModel.BigSmallMultiple   = bignumber;
            productModel.ProductArea        = productArea;
            productModel.CostPrice          = costPrice;
            productModel.CommonPrice        = commonPrice;
            productModel.CommonPV           = commonPV;
            productModel.PreferentialPrice  = preferentialPrice;
            productModel.PreferentialPV     = preferentialPV;
            productModel.AlertnessCount     = alertCount;
            productModel.Description        = productDescription;
            productModel.Weight             = Weight;
            if (ImageContent.Length > 0)
            {
                productModel.ProductImage = ImageContent;
            }

            else
            {
                int imageSate = Convert.ToInt32(ViewState["imageState"]);
                if (imageSate == 0)
                {
                    productModel.ProductImage = ImageContent;
                }

                if (imageSate == 1)
                {
                    productModel.ProductImage = (byte[])ViewState["image"];
                }
            }
            productModel.ImageType        = strImageType;
            productModel.CountryCode      = ViewState["CountryCode"].ToString();
            productModel.Currency         = Convert.ToInt32(ViewState["CurrencyID"]);
            productModel.IsCombineProduct = (byte)(chbcombine.Checked ? 1 : 0);
            productModel.OperateIP        = CommonDataBLL.OperateIP;
            productModel.OperateNum       = CommonDataBLL.OperateBh;
            productModel.ProductCode      = this.txtProductCode.Text.Trim();
            productModel.IsSell           = isSell;
            productModel.Length           = Length;
            productModel.Width            = Width;
            productModel.High             = High;
            productModel.Details_TX       = Request.Form["txtDetails"].ToString();
            productModel.GroupIDS_AZ_TX   = txt_GroupIDS_AZ_TX.Text;
            productModel.GroupIDS_TJ_TX   = txt_GroupIDS_TJ_TX.Text;
            productModel.OnlyForGroup_NR  = rbtnN.Checked == true ? 0 : 1;
            if (this.ChboxFirst.Checked && this.ChboxAgain.Checked)
            {
                productModel.Yongtu = 0;
            }
            else
            {
                if (this.ChboxFirst.Checked)
                {
                    productModel.Yongtu = 1;
                }
                if (this.ChboxAgain.Checked)
                {
                    productModel.Yongtu = 2;
                }
            }
        }
        else
        {
            productModel.ProductTypeID      = 0;
            productModel.ProductTypeName    = "";
            productModel.ProductSpecID      = 0;
            productModel.ProductColorID     = 0;
            productModel.ProductSexTypeID   = 0;
            productModel.ProductStatusID    = 0;
            productModel.BigProductUnitID   = 0;
            productModel.SmallProductUnitID = 0;
            productModel.BigSmallMultiple   = 0;
            productModel.ProductArea        = "";
            productModel.CostPrice          = costPrice;
            productModel.CommonPrice        = commonPrice;
            productModel.CommonPV           = commonPV;
            productModel.PreferentialPrice  = preferentialPrice;
            productModel.PreferentialPV     = preferentialPV;
            productModel.AlertnessCount     = alertCount;
            productModel.Description        = productDescription;
            productModel.ProductImage       = ImageContent;
            productModel.ImageType          = strImageType;
            productModel.Weight             = 0;
            productModel.CountryCode        = ViewState["CountryCode"].ToString();
            productModel.Currency           = Convert.ToInt32(ViewState["CurrencyID"]);
            productModel.OperateIP          = CommonDataBLL.OperateIP;
            productModel.OperateNum         = CommonDataBLL.OperateBh;
            productModel.ProductCode        = "";
            productModel.IsSell             = isSell;
        }

        if (editingID == 0) //添加数据
        {
            bool isEsist = AddNewProductBLL.ProductNameIsExist(productName);
            ///产品
            if (!isFold)
            {
                if (isEsist)
                {
                    this.lblMessage.Text = GetTran("004113", "此产品名称已经存在!");
                    return;
                }
            }

            ///产品类
            else
            {
                if (isEsist)
                {
                    this.lblMessage.Text = GetTran("004116", "此产品类名已经存在!");
                    return;
                }
            }

            productModel.PID = Convert.ToInt32(this.pID);

            strMessage = GetTran("000492", "添加");

            string oldID        = "";
            string languageName = "";
            string languageID   = "";

            using (SqlConnection conn = new SqlConnection(DBHelper.connString))
            {
                conn.Open();
                using (SqlTransaction tran = conn.BeginTransaction())
                {
                    try
                    {
                        //增加产品
                        AddNewProductBLL.AddProduct(tran, productModel);
                        //---多语言产品操作

                        ///获取新产品信息
                        //DataTable dtpro = AddNewProductBLL.GetNewProductInfo();

                        //if(dtpro.Rows.Count>0)
                        //{
                        //    oldID=dtpro.Rows[0]["productid"].ToString();
                        //    languageName=dtpro.Rows[0]["productname"].ToString();

                        //    string description=dtpro.Rows[0]["Description"].ToString().Trim();

                        //    //获取语言种类(ID>1)
                        //    DataTable dtlang = AddNewProductBLL.GetLanguageIDByID();

                        //    for(int i=0;i<dtlang.Rows.Count;i++)
                        //    {
                        //        languageID=dtlang.Rows[i][0].ToString();

                        //        //获取----获取(产品目录)是否插入
                        //        int count = AddNewProductBLL.GetLanguageTransCountByID(Convert.ToInt32(languageID));

                        //        if(count==0)
                        //        {
                        //            ///向产品名称等翻译表插入相关记录
                        //            languageTrans.TableName="Product";
                        //            languageTrans.OldID=1;
                        //            languageTrans.ColumnsName = productName;
                        //            languageTrans.LanguageName = GetTran("004117","产品目录");
                        //            languageTrans.LanguageID =Convert.ToInt32(languageID);
                        //            AddNewProductBLL.AddLanguageTrans(tran, languageTrans);
                        //        }

                        //        if(description!="")
                        //        {
                        //            ///	向产品名称等翻译表插入相关记录
                        //            languageTrans.TableName = "Product";
                        //            languageTrans.OldID =Convert.ToInt32(oldID);
                        //            languageTrans.ColumnsName ="Description";
                        //            languageTrans.LanguageName=description;
                        //            languageTrans.LanguageID=Convert.ToInt32(languageID);
                        //            AddNewProductBLL.AddLanguageTrans(tran, languageTrans);
                        //        }

                        //        ///向产品名称等翻译表插入相关记录
                        //        languageTrans.TableName = "Product";
                        //        languageTrans.OldID =Convert.ToInt32(oldID);
                        //        languageTrans.ColumnsName = productName;
                        //        languageTrans.LanguageName= languageName;
                        //        languageTrans.LanguageID =Convert.ToInt32(languageID);
                        //        AddNewProductBLL.AddLanguageTrans(tran, languageTrans);
                        //    }
                        //}

                        tran.Commit();
                    }

                    catch (System.Exception ee)
                    {
                        tran.Rollback();
                        System.Diagnostics.Trace.WriteLine(ee.Message);
                        throw;
                    }
                }
            }
        }
        else //修改数据
        {
            strMessage = GetTran("000259", "修改");

            // before delete
            ChangeLogs cl = new ChangeLogs("Product", "ProductID");
            cl.AddRecord(this.editingID);

            //--多语言产品操作(只更新产品说明)

            //获取产品说明
            //string Description = AddNewProductBLL.GetDescriptionByID(Convert.ToInt32(this.editingID)).Trim();

            //string langID="";

            //if(Description=="" && productDescription.Trim()!="")
            //{
            //    //查找ID>1的所有ID
            //    DataTable dtlang = AddNewProductBLL.GetLanguageIDByID();

            //    for(int i=0;i<dtlang.Rows.Count;i++)
            //    {
            //        langID=dtlang.Rows[i][0].ToString();

            //        ///插入相关记录
            //        languageTrans.TableName = "Product";
            //        languageTrans.OldID = Convert.ToInt32(this.editingID);
            //        languageTrans.ColumnsName = Description;
            //        languageTrans.LanguageName = productDescription;
            //        languageTrans.LanguageID =Convert.ToInt32(langID);
            //        AddNewProductBLL.AddLanguageTrans(languageTrans);
            //    }
            //}

            ///注意传参产品ID
            productModel.ProductID = this.editingID;
            int updCount = AddNewProductBLL.UpdProduct(productModel);


            if (updCount > 0)
            {
                cl.AddRecord(this.editingID);
                cl.ModifiedIntoLogs(ChangeCategory.company7, Session["Company"].ToString(), ENUM_USERTYPE.objecttype1);

                this.lblMessage.Text = strMessage + GetTran("004124", "成功!");
            }
            else
            {
                this.lblMessage.Text = strMessage + GetTran("004128", "失败,请联系管理员!");
            }
        }

        if (this.editingID == 0)
        {
            this.lblMessage.Text += GetTran("004132", "您可以继续添加此类下的产品");
        }

        this.lblMessage.Text += "(" + GetTran("004140", "按 关闭 后可查看新数据") + ")";

        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001401", "操作成功!") + "');reloadopener();</script>");
        SetValue();
    }
示例#28
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string[] args = e.CommandArgument.ToString().Split(',');

        string        numebr      = args[0].ToString();
        string        isAuditing  = args[1].ToString();
        int           id          = Convert.ToInt32(args[2].ToString());
        double        money       = Convert.ToDouble(args[3].ToString());
        double        withdrawSXF = Convert.ToDouble(args[4].ToString());
        double        wyj         = Convert.ToDouble(args[5].ToString());
        int           IsJL        = Convert.ToInt16(args[6].ToString());
        WithdrawModel wDraw       = new WithdrawModel();

        wDraw.Id     = id;
        wDraw.Number = numebr;
        wDraw.ApplicationExpecdtNum = BLL.CommonClass.CommonDataBLL.getMaxqishu();
        wDraw.WithdrawMoney         = money;
        wDraw.WithdrawSXF           = withdrawSXF;
        wDraw.Wyj              = wyj;
        wDraw.AuditExpectNum   = BLL.CommonClass.CommonDataBLL.getMaxqishu();
        wDraw.AuditingIP       = BLL.CommonClass.CommonDataBLL.OperateIP;
        wDraw.AuditingManageId = BLL.CommonClass.CommonDataBLL.OperateBh;
        wDraw.AuditTime        = DateTime.Now.ToUniversalTime();
        wDraw.IsJL             = IsJL;

        if (e.CommandName.ToString() == "Lbtn")
        {
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 2)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007176", "该申请单已经审核,不可以重复审核!") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }

            if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007177", "该申请单已经被删除!") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
            if (wDraw.IsJL != 1)
            {
                double leftMoney = Convert.ToDouble(BLL.CommonClass.CommonDataBLL.GetLeftMoney1(numebr));
                if (money > leftMoney)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007175", "可提现余额不足,不能审核!") + "')</script>");
                    return;
                }
            }
            Application.Lock();
            bool isSure = false;

            isSure = BLL.Registration_declarations.RegistermemberBLL.AuditWithdraw(wDraw);

            Application.UnLock();
            if (isSure)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000858", "审核成功!") + "')</script>");
                this.BtnConfirm_Click(null, null);
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("006041", "审核失败!") + "')</script>");
                return;
            }
        }
        if (e.CommandName == "Del")
        {
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 1)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007174", "该申请单已经审核,不可以删除!") + "');</script>");
                return;
            }
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 3)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007173", "该申请单账号错误,不可以删除!") + "');</script>");
                return;
            }

            if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007178", "该申请单已经删除,不可以删除!") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }

            ChangeLogs cl = new ChangeLogs("MemberCash", "ltrim(rtrim(str(id)))");
            cl.AddRecord(wDraw.Id);
            Application.Lock();
            bool isSure = BLL.Registration_declarations.RegistermemberBLL.DeleteWithdraw(wDraw);
            Application.UnLock();
            if (isSure)
            {
                cl.AddRecord(wDraw.Id);
                cl.DeletedIntoLogs(ChangeCategory.company14, Session["Company"].ToString(), ENUM_USERTYPE.objecttype5);

                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000008", "删除成功!)") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000009", "删除失败!)") + "')</script>");
                return;
            }
        }
        //账号错误
        if (e.CommandName == "carderror")
        {
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 2)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007181", "该申请单已经审核,不可以转成账号错误!") + "');</script>");
                return;
            }
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 3)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007180", "该申请单已经是账号错误,不可以重复账号错误!") + "');</script>");
                return;
            }

            if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007179", "该申请单已经删除,不可以转成账号错误!") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }

            ChangeLogs cl = new ChangeLogs("MemberCash", "ltrim(rtrim(str(id)))");
            cl.AddRecord(wDraw.Id);
            Application.Lock();
            bool isSure = false;

            isSure = BLL.Registration_declarations.RegistermemberBLL.updateCardEorror(wDraw.Id, wDraw.WithdrawMoney, wDraw.Number);

            Application.UnLock();
            if (isSure)
            {
                cl.AddRecord(wDraw.Id);
                cl.DeletedIntoLogs(ChangeCategory.company14, Session["Company"].ToString(), ENUM_USERTYPE.objecttype5);

                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!)") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001541", "操作失败!)") + "')</script>");
                return;
            }
        }
        //开始处理
        if (e.CommandName == "kscl")
        {
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 1)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007182", "该申请单已经审核,不可以在开始处理!") + "');</script>");
                return;
            }
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 2)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007183", "该申请单已经开始处理,不可以在开始处理!") + "');</script>");
                return;
            }
            if (BLL.Registration_declarations.RegistermemberBLL.GetMemberCashAuditState(id) == 3)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007184", "该申请单已经是账号错误,不可以在开始处理!") + "');</script>");
                return;
            }

            if (!BLL.Registration_declarations.RegistermemberBLL.isDelMemberCash(id))
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("007185", "该申请单已经删除,不可以在开始处理!") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }

            ChangeLogs cl = new ChangeLogs("Withdraw", "ltrim(rtrim(str(id)))");
            cl.AddRecord(wDraw.Id);
            Application.Lock();
            bool isSure = BLL.Registration_declarations.RegistermemberBLL.updateKscl(wDraw.Id);
            Application.UnLock();
            if (isSure)
            {
                cl.AddRecord(wDraw.Id);
                cl.DeletedIntoLogs(ChangeCategory.company14, Session["Company"].ToString(), ENUM_USERTYPE.objecttype5);

                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!)") + "')</script>");
                this.BtnConfirm_Click(null, null);
                return;
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001541", "操作失败!)") + "')</script>");
                return;
            }
        }
    }
示例#29
0
    protected void BtnUpdate_Click1(object sender, EventArgs e)
    {
        BLL.Registration_declarations.RegistermemberBLL registermemberBLL = new BLL.Registration_declarations.RegistermemberBLL();
        if (this.Number.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000129", "对不起,会员编号不能为空!") + "');", true);
            return;
        }
        if (this.Name.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000131", "对不起,会员姓名不能为空!") + "');", true);
            return;
        }
        if (MoblieTele.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000000", "移动电话不能为空!") + "');", true);
            return;
        }
        else
        {
            if (MoblieTele.Text.Length != 11)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000000", "移动电话格式不正确!") + "');", true);
                return;
            }
        }
        if (this.PostolCode.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000134", "对不起,邮编不能为空!") + "');", true);
            return;
        }
        if (this.PetName.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000136", "对不起,会员昵称不能为空!") + "');", true);
            return;
        }

        if (this.PaperNumber.Text == "" && this.PaperType.SelectedValue.Trim() != "P000")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000140", "对不起,证件号码不能为空!") + "');", true);
            return;
        }


        if (this.Address.Text == "")
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("000146", "对不起,地址不能为空!") + "');", true);
            return;
        }
        //检查会员生日
        if (this.PaperType.SelectedValue.Trim() != "P001")    //如果证件类型不是身份证 则判断会员生日是否输入
        {
            if (registermemberBLL.CheckBirthDay(this.Birthday.Text) == "error")
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + GetTran("000148", "对不起,请选择正确的出生日期!") + "');", true);

                return;
            }

            //验证年龄是否大于18岁
            string alert = registermemberBLL.AgeIs18(this.Birthday.Text.Trim());
            if (alert != null)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + alert + "');", true);

                return;
            }
        }


        //检测身份证需要新方法
        string birthdaysex = "";

        if (this.PaperType.SelectedValue.Trim() == "P001")
        {
            string result = BLL.Registration_declarations.CheckMemberInfo.CHK_IdentityCard(CommonDataBLL.quanjiao(this.PaperNumber.Text.Trim()));
            if (result.IndexOf(",") <= 0)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + result + "');", true);
                return;
            }
            else
            {
                birthdaysex = result; // 从身份证号中取到生日和性别组成的字符串用逗号分隔
            }
        }

        string        oldChangeInfo = "";
        bool          flag          = false;
        StringBuilder changeInfo    = new StringBuilder();
        ChangeLogs    cl            = new ChangeLogs("MemberInfo", "ltrim(rtrim(Number))");

        cl.AddRecord(ViewState["Number"].ToString());
        MemberInfoModel mem = MemInfoEditBLL.getMemberInfo(ViewState["Number"].ToString());

        oldChangeInfo = mem.ChangeInfo.ToString();
        changeInfo.Append(mem.ChangeInfo.ToString());

        changeInfo.Append(GetTran("000151", "管理员 "));
        changeInfo.Append(Session["Company"]);
        changeInfo.Append(GetTran("000153", " 在 "));
        changeInfo.Append(DateTime.Now.ToString());
        changeInfo.Append(GetTran("000156", " 第 "));
        changeInfo.Append(Session["ExpectNum"].ToString());
        changeInfo.Append(GetTran("000157", " 期 "));
        changeInfo.Append(GetTran("000161", " 修改了如下内容") + ":");

        //判断用户是否修改了姓名
        if (this.Name.Text != Encryption.Encryption.GetDecipherName(mem.Name.ToString().Trim()))
        {
            flag = true;
            changeInfo.Append("\n" + GetTran("000164", " 修改了姓名,原姓名") + ":");
            changeInfo.Append(mem.Name.ToString());
            changeInfo.Append(";" + GetTran("000166", " 新姓名") + ":");
            changeInfo.Append(this.Name.Text.ToString());
        }
        //判断用户是否修改了昵称
        if (this.PetName.Text != mem.PetName.ToString())
        {
            flag = true;
            changeInfo.Append("\n" + GetTran("000168", " 修改了昵称,原昵称") + ":");
            changeInfo.Append(mem.PetName.ToString());
            changeInfo.Append(";" + GetTran("000170", " 新昵称") + ":");
            changeInfo.Append(this.PetName.Text.ToString());
        }



        //判断是否更改了证件号码和证件类型
        if ((this.PaperType.SelectedValue.ToString() != mem.Papertypecode) || (this.PaperNumber.Text.Trim() != Encryption.Encryption.GetDecipherNumber(mem.PaperNumber.Trim())))
        {
            if (this.PaperType.ToString().Trim() != "")
            {
                flag = true;
                changeInfo.Append("\n" + GetTran("000202", " 修改了证件类型或证件号码,原证件类型") + ":");
                changeInfo.Append(mem.PaperType.ToString());
                changeInfo.Append("," + GetTran("000203", " 原证件号码") + ":");
                changeInfo.Append(mem.PaperNumber.ToString());
                changeInfo.Append(";" + GetTran("000206", " 新证件类型") + ":");
                changeInfo.Append(this.PaperType.ToString());
                changeInfo.Append("," + GetTran("000207", " 新证件号码") + ":");
                changeInfo.Append(this.PaperNumber.ToString());
            }
        }

        //判断用户是否修改了开户行
        if (this.MemberBank.SelectedValue.ToString() != mem.Bank.ToString())
        {
            flag = true;
            changeInfo.Append("\n" + GetTran("000210", " 修改了开户行,原开户行") + ":");
            changeInfo.Append(mem.Bank.ToString());
            changeInfo.Append(";" + GetTran("000211", " 新开户行") + ":");
            changeInfo.Append(this.MemberBank.SelectedValue.ToString());
        }


        //判断用户是否修改了银行帐号
        if (this.BankNum.Text.ToString() != mem.BankCard.ToString())
        {
            flag = true;
            changeInfo.Append("\n" + GetTran("000212", " 修改了银行帐号,原银行帐号") + ":");
            changeInfo.Append(mem.BankCard.ToString());
            changeInfo.Append(";" + GetTran("000216", " 新银行帐号") + ":");
            changeInfo.Append(this.BankNum.Text.ToString());
            changeInfo.Append("\n");
        }



        string   Number    = this.Number.Text.ToString();
        string   Placement = this.Placement.Text.ToString();
        string   Direct    = this.Recommended.Text.ToString();
        string   Name      = Encryption.Encryption.GetEncryptionName(this.Name.Text.ToString().Trim());
        string   PetName   = this.PetName.Text.ToString();
        DateTime Birthday  = DateTime.Parse(this.Birthday.Text.ToString());
        int      Sex       = 0;

        if (this.PaperType.SelectedValue.Trim() == "P001")
        {
            Sex      = birthdaysex.Substring(birthdaysex.IndexOf(",") + 1).Trim() == GetTran("000094", "男") ? (1) : (0);
            Birthday = Convert.ToDateTime(birthdaysex.Substring(0, birthdaysex.IndexOf(",")));
            //验证年龄是否大于18岁
            string alert = registermemberBLL.AgeIs18(Birthday.ToString());
            if (alert != null)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "alert('" + alert + "');", true);

                return;
            }
        }
        else
        {
            Birthday = DateTime.Parse(this.Birthday.Text.ToString());

            if (this.Sex.SelectedValue.ToString() == "0")
            {
                Sex = 0;
            }
            else
            {
                Sex = 1;
            }
        }
        //邮编号
        string PostalCode = this.PostolCode.Text.ToString();
        //家庭电话号码
        string HomeTele = this.Txtjtdh.Text.Trim() == "电话号码" ? "" : Encryption.Encryption.GetEncryptionTele(this.Txtjtdh.Text.ToString().Trim());
        //办公电话号码
        string OfficeTele = this.Txtbgdh.Text.Trim() == "电话号码" ? "" : Encryption.Encryption.GetEncryptionTele(this.Txtbgdh.Text.ToString().Trim());
        //传真电话号
        string FaxTele = this.Txtczdh.Text.Trim() == "电话号码" ? "" : Encryption.Encryption.GetEncryptionTele(this.Txtczdh.Text.ToString().Trim());
        //手机号
        string MobileTele = Encryption.Encryption.GetEncryptionTele(this.MoblieTele.Text.ToString().Trim());
        string Country    = this.CountryCity1.Country;  //国家
        string Province   = this.CountryCity1.Province; //省份
        string City       = this.CountryCity1.City;     //城市
        string Xian       = this.CountryCity1.Xian;
        //详细地址
        string Address     = Encryption.Encryption.GetEncryptionAddress(this.Address.Text.ToString().Trim());
        string PaperNumber = Encryption.Encryption.GetEncryptionNumber(this.PaperNumber.Text.ToString().Trim());  //证件号
        string PaperType   = this.PaperType.SelectedValue.ToString().Trim();                                      //证件类型
        string Bank        = this.MemberBank.SelectedValue.ToString();                                            //银行名称
        string BankAddress = Encryption.Encryption.GetEncryptionAddress(this.BankAdderss.Text.ToString().Trim()); //银行地址
        //银行所属国家
        string BankCountry  = this.CountryCity2.Country;
        string BankProvince = this.CountryCity2.Province;                                                   //银行所属省份
        string BankCity     = this.CountryCity2.City;                                                       //银行所属城市
        string BankCard     = Encryption.Encryption.GetEncryptionCard(this.BankNum.Text.ToString().Trim()); //银行卡号
        string BankBook     = Encryption.Encryption.GetEncryptionName(this.Name.Text.ToString().Trim());    //开户名
        //当前期数
        int ExpectNum = Convert.ToInt32(this.ExpectNum.Text.ToString());

        if (this.Remark.Text.Length > 500)  //备注在500字以内
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "alert('" + GetTran("006708", "对不起,备注输入的字符太多,最多500个字符!") + "');", true);
            return;
        }
        ;
        string Remark     = this.Remark.Text.ToString();
        string OrderId    = this.OrderID.Text.ToString();
        string ChangeInfo = "";

        if (flag == true)
        {
            ChangeInfo = changeInfo.ToString(); //修改信息提示
        }
        else
        {
            ChangeInfo = oldChangeInfo;
        }

        //
        string          OperateIp   = HttpContext.Current.Request.UserHostAddress.ToString();
        string          OperaterNum = CommonDataBLL.OperateBh;
        MemberInfoModel info        = new MemberInfoModel();

        info.Number         = Number;
        info.Placement      = ViewState["Placement"].ToString();
        info.Direct         = ViewState["Direct"].ToString();
        info.Name           = Name;
        info.PetName        = PetName;
        info.Birthday       = Birthday;
        info.Sex            = Sex;
        info.PostalCode     = PostalCode;
        info.StoreID        = "8888888888";
        info.HomeTele       = HomeTele;
        info.OfficeTele     = OfficeTele;
        info.MobileTele     = MobileTele;
        info.FaxTele        = FaxTele;
        info.CPCCode        = CommonDataDAL.GetCPCCode(Country, Province, City, Xian);
        info.Address        = Address;
        info.Papertypecode  = PaperType;
        info.PaperNumber    = PaperNumber;
        info.BankCode       = Bank;
        info.BankAddress    = BankAddress;
        info.BankCard       = BankCard;
        info.BankBook       = BankBook;
        info.ExpectNum      = ExpectNum;
        info.Remark         = Remark;
        info.OrderID        = OrderId;
        info.ChangeInfo     = changeInfo.ToString();
        info.OperateIp      = OperateIp;
        info.OperaterNum    = OperaterNum;
        info.BCPCCode       = CommonDataDAL.GetCPCCode(BankCountry, BankProvince, BankCity);
        info.Bankbranchname = this.txtEbank.Text;
        info.PhotoPath      = "";
        int jjtx = Convert.ToInt32(this.rbtJj.SelectedValue);

        updMemberInfo(info);       // 修改信息
        cl.AddRecord(info.Number); //记录操作
        //记录日志
        cl.ModifiedIntoLogs(ChangeCategory.company0, info.Number, ENUM_USERTYPE.objecttype5);
    }
示例#30
0
    /// <summary>
    /// 确认
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSaveOrder_Click(object sender, EventArgs e)
    {
        if (Session["storageList"] == null || Session["storageList"].ToString() == "")
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001992", "对不起,您所填写的入库产品的数量不能全部是0!")));
            return;
        }
        else
        {
            if (ddlProvider.SelectedValue == "")
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("006009", "对不起,请选择供应商!")));
                return;
            }
            if (ddlDepotSeat.SelectedValue == "")
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001934", "对不起,请选择库位!")));
                return;
            }

            if (txtpici.Text == "")
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("002027", "填写批次")));
                return;
            }

            ///通过批次通过入库批次获取入库批次行数
            var boolvalue = GetOrderInfo();
            if (!boolvalue)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("正确填入产品数量!"));
                return;
            }

            DateTime dt               = MYDateTime1.GetCurrentDateTime();
            string   BatchCode        = this.txtpici.Text.ToString();
            string   availableOrderID = ViewState["billId"].ToString();
            int      i = StorageInBLL.CheckBatch(availableOrderID, BatchCode);
            if (i > 0)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("001995", "批次已存在!")));
                return;
            }
            string            makeman = CommonDataBLL.GetNameByAdminID(Session["Company"].ToString());
            int               n       = 0;
            InventoryDocModel idm     = new InventoryDocModel();
            idm.Provider        = Convert.ToInt32(ddlProvider.SelectedValue);
            idm.WareHouseID     = Convert.ToInt32(this.ddlWareHouse.SelectedValue);
            idm.DepotSeatID     = Convert.ToInt32(this.ddlDepotSeat.SelectedValue);
            idm.TotalMoney      = Convert.ToDouble(ViewState["zongPrice"]);
            idm.TotalPV         = Convert.ToDouble(ViewState["totalPV"]);
            idm.ExpectNum       = CommonDataBLL.getMaxqishu();
            idm.Note            = this.txtMemo.Text.ToString();
            idm.BatchCode       = this.txtpici.Text.ToString();
            idm.OperationPerson = this.txtOperationPerson.Text.ToString();
            idm.DocID           = ViewState["billId"].ToString();
            idm.Address         = this.txtAddress.Text.ToString();
            idm.OriginalDocID   = this.txtOriginalDocID.Text.ToString();
            idm.OperateIP       = CommonDataBLL.OperateIP;
            idm.OperateNum      = CommonDataBLL.OperateBh;
            ChangeLogs cl = new ChangeLogs("InventoryDoc", "DocID");
            cl.AddRecord(idm.DocID);
            n = StorageInBLL.updAndSaveOrder(idm, list);//(ArrayList)ViewState["list"]
            if (n > 0)
            {
                cl.AddRecord(idm.DocID);
                cl.ModifiedIntoLogs(ChangeCategory.company8, Session["Company"].ToString(), ENUM_USERTYPE.objecttype0);
                ScriptManager.RegisterStartupScript(this, GetType(), "abs", "alert('" + GetTran("004179", "入库单编辑完成,等待管理员审核!") + "');location.href='StorageInBrowse.aspx'", true);
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert(GetTran("004180", "入库单编辑失败,请准确填写!")));
            }
        }
    }