Example #1
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("store_domain", DTEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount   = 0;
            int errorCount = 0;

            BLL.StoreDomain bll = new BLL.StoreDomain();
            //批量删除
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount += 1;
                    }
                    else
                    {
                        errorCount += 1;
                    }
                }
            }
            AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除仓库区域成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!",
                       Utils.CombUrlTxt("store_domain_list.aspx", "keywords={0}", txtKeywords.Text.Trim()));
        }
Example #2
0
 private void ShowInfo(int _id)
 {
     BLL.StoreDomain   bll   = new BLL.StoreDomain();
     Model.StoreDomain model = bll.GetModel(_id);
     txtName.Text   = model.Name;
     txtRemark.Text = model.Remark;
 }
Example #3
0
 private void RptBind(string _strWhere)
 {
     this.txtKeywords.Text = this.keywords;
     BLL.StoreDomain bll = new BLL.StoreDomain();
     this.rptList.DataSource = bll.GetList(0, _strWhere, "Id DESC");
     this.rptList.DataBind();
 }
Example #4
0
 private void RptBind(string _strWhere)
 {
     this.txtKeywords.Text = this.keywords;
     BLL.StoreDomain bll = new BLL.StoreDomain();
     this.rptList.DataSource = bll.GetList(0, _strWhere, "Id DESC");
     this.rptList.DataBind();
 }
Example #5
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("store_domain", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     int sucCount = 0;
     int errorCount = 0;
     BLL.StoreDomain bll = new BLL.StoreDomain();
     //批量删除
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             if (bll.Delete(id))
             {
                 sucCount += 1;
             }
             else
             {
                 errorCount += 1;
             }
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除仓库区域成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
     JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!",
         Utils.CombUrlTxt("store_domain_list.aspx", "keywords={0}", txtKeywords.Text.Trim()));
 }
Example #6
0
        private void TreeBind(string strWhere)
        {
            BLL.StoreDomain bll = new BLL.StoreDomain();
            DataTable       dt  = bll.GetList(0, strWhere, "Id desc").Tables[0];

            this.ddlStoreDomain.Items.Clear();
            this.ddlStoreDomain.Items.Add(new ListItem("请选择仓库区域...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlStoreDomain.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString()));
            }
        }
Example #7
0
        private bool DoAdd()
        {
            bool result = false;
            Model.StoreDomain model = new Model.StoreDomain();
            BLL.StoreDomain bll = new BLL.StoreDomain();

            model.Name = txtName.Text;
            model.Remark = txtRemark.Text;
            if (bll.Add(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加仓库区域:" + model.Name); //记录日志
                result = true;
            }
            return result;
        }
Example #8
0
        private bool DoAdd()
        {
            bool result = false;

            Model.StoreDomain model = new Model.StoreDomain();
            BLL.StoreDomain   bll   = new BLL.StoreDomain();

            model.Name   = txtName.Text;
            model.Remark = txtRemark.Text;
            if (bll.Add(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加仓库区域:" + model.Name); //记录日志
                result = true;
            }
            return(result);
        }
Example #9
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.StoreDomain   bll   = new BLL.StoreDomain();
            Model.StoreDomain model = bll.GetModel(_id);

            model.Name   = txtName.Text;
            model.Remark = txtRemark.Text;
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改仓库区域:" + model.Name); //记录日志
                result = true;
            }

            return(result);
        }
Example #10
0
        private void TreeBind(string strWhere)
        {
            BLL.StoreDomain bll = new BLL.StoreDomain();
            DataTable dt = bll.GetList(0, strWhere, "id desc").Tables[0];

            this.ddlStoreDomain.Items.Clear();
            this.ddlStoreDomain.Items.Add(new ListItem("所有仓库区域", ""));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlStoreDomain.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString()));
            }
        }
Example #11
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.StoreDomain bll = new BLL.StoreDomain();
            Model.StoreDomain model = bll.GetModel(_id);

            model.Name = txtName.Text;
            model.Remark = txtRemark.Text;
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改仓库区域:" + model.Name); //记录日志
                result = true;
            }

            return result;
        }
Example #12
0
 private void ShowInfo(int _id)
 {
     BLL.StoreDomain bll = new BLL.StoreDomain();
     Model.StoreDomain model = bll.GetModel(_id);
     txtName.Text = model.Name;
     txtRemark.Text = model.Remark;
 }