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

            BLL.daikuan_chanye bll = new BLL.daikuan_chanye();
            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("daikuan_chanye_list.aspx", "keywords={0}", this.keywords));
        }
Exemplo n.º 2
0
 private void ShowInfo(int _id)
 {
     BLL.daikuan_chanye   bll   = new BLL.daikuan_chanye();
     Model.daikuan_chanye model = bll.GetModel(_id);
     txtName.Text = model.name;
     //txtAmount.Text = model.amount.ToString();
     txtAddTime.Text = model.add_time.Value.ToString("yyyy-MM-dd HH:mm:ss");
 }
Exemplo n.º 3
0
        private void ChanYeBind()
        {
            BLL.daikuan_chanye bll = new BLL.daikuan_chanye();
            DataTable          dt  = bll.GetList("").Tables[0];

            ddlChanYe.Items.Clear();
            ddlChanYe.Items.Add(new ListItem("请选择产业规模", ""));
            foreach (DataRow dr in dt.Rows)
            {
                ddlChanYe.Items.Add(new ListItem(dr["name"].ToString(), dr["id"].ToString()));
            }
        }
Exemplo n.º 4
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page        = DTRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.daikuan_chanye bll = new BLL.daikuan_chanye();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("daikuan_chanye_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Exemplo n.º 5
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.daikuan_chanye   bll   = new BLL.daikuan_chanye();
            Model.daikuan_chanye model = bll.GetModel(_id);
            model.name = txtName.Text.Trim();
            //model.amount = Utils.StrToDecimal(txtAmount.Text, 0);
            model.add_time = Utils.StrToDateTime(txtAddTime.Text.Trim());
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改产业规模:" + model.name); //记录日志
                result = true;
            }

            return(result);
        }
Exemplo n.º 6
0
 private bool DoAdd()
 {
     Model.daikuan_chanye model = new Model.daikuan_chanye();
     BLL.daikuan_chanye   bll   = new BLL.daikuan_chanye();
     //检测会员证号码是否重复
     if (bll.Exists(txtName.Text.Trim()))
     {
         return(false);
     }
     model.name = txtName.Text.Trim();
     //model.amount = Utils.StrToDecimal(txtAmount.Text, 0);
     model.add_time = Utils.StrToDateTime(txtAddTime.Text.Trim());
     if (bll.Add(model) > 0)
     {
         AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加产业规模:" + model.name); //记录日志
         return(true);
     }
     return(false);
 }