Esempio n. 1
0
 protected void btnDelAll_Click(object sender, EventArgs e)
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         foreach (int row in gvList.SelectedRowIndexArray)
         {
             sb.Append(gvList.DataKeys[row][0].ToString());
             subCompany.SubCompanyId = Convert.ToDouble(gvList.DataKeys[row][0].ToString());
             subCompany = companyService.GetDictSubcompanyById(subCompany);
         }
         var library = new DictSubCompanyService();
         int nflag   = library.DelSubcompanyById(sb.ToString().TrimEnd(','));
         if (nflag > 0)
         {
             MessageBoxShow("所选项已成功删除", MessageBoxIcon.Information);
             BindGrid();
             subCompanyId = 0;
             LoadEditDate();
         }
     }
     catch (Exception ex)
     {
         MessageBoxShow(ex.Message);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 绑定签约子公司列表
        /// </summary>
        private void BindSubCompanyList()
        {
            IList <daan.domain.DictSubCompany> list = new DictSubCompanyService().GetDictSubCompanyList("");

            dropSubCompany.DataSource     = list;
            dropSubCompany.DataTextField  = "SubCompanyName";
            dropSubCompany.DataValueField = "SubCompanyId";
            dropSubCompany.DataBind();
            dropSubCompany.Items.Insert(0, new ExtAspNet.ListItem("请选择", "-1"));
        }
Esempio n. 3
0
 private void LoadEditDate()
 {
     subCompany.SubCompanyId = subCompanyId;
     daan.domain.DictSubCompany dictsubfo = new DictSubCompanyService().GetDictSubcompanyById(subCompany);
     if (dictsubfo == null)
     {
         subCompany                  = new daan.domain.DictSubCompany();
         SimpleFormEdit.Title        = "当前状态-新增";
         this.tbxSUBCOMPANYNAME.Text = subCompany.SubCompanyName;
         this.tbxADDRES.Text         = subCompany.Addres;
         this.tbxDISPLAYORDER.Text   = subCompany.Displayorder.ToString();
         this.tbxPHONE.Text          = subCompany.Phone;
         this.TbsREMARK.Text         = subCompany.Remark;
     }
     else
     {
         this.tbxSUBCOMPANYNAME.Text = dictsubfo.SubCompanyName;
         this.tbxADDRES.Text         = dictsubfo.Addres;
         this.tbxDISPLAYORDER.Text   = dictsubfo.Displayorder.ToString();
         this.tbxPHONE.Text          = dictsubfo.Phone;
         this.TbsREMARK.Text         = dictsubfo.Remark;
     }
 }