Esempio n. 1
0
        private void getType()
        {
            IList <FactType> com = FactTypeManager.getFactTypeAll();

            this.rpCusType.DataSource = com;
            this.rpCusType.DataBind();
        }
Esempio n. 2
0
        //绑定公司类别
        //private void bindList()
        //{
        //    this.ddlList.Items.Clear();
        //    IList<CusType> typelist = CusTypeManager.getCusTypeAll();
        //    foreach (var item in typelist)
        //    {
        //        ListItem list = new ListItem(item.TypeName, item.Id.ToString());
        //        this.ddlList.Items.Add(list);
        //    }
        //    ListItem ltem = new ListItem("选择类别", "-1");//添加第一行默认值
        //    this.ddlList.Items.Insert(0, ltem);//添加第一行默认值
        //}


        ///// <summary>
        ///// 审核流规则
        ///// </summary>
        //private void LoadRule()
        //{
        //    EtNet_Models.LoginInfo login = (EtNet_Models.LoginInfo)Session["login"];
        //    string fields = " id,(sort + '—' + cname  ) as rulename ";
        //   // string strsql = " jobflowsort='03' AND  ',' + departidlist + ',' like '%," + login.Departid.ToString() + ",%' ";
        //    //DataTable tbl = EtNet_BLL.ViewBLL.ViewApprovalRuleManager.getList(fields, strsql);
        //    DataRow row = tbl.NewRow();
        //    row["id"] = "0";
        //    row["rulename"] = "——请选中——";
        //    tbl.Rows.InsertAt(row, 0);
        //    this.ddlrule.DataSource = tbl;
        //    this.ddlrule.DataValueField = "id";
        //    this.ddlrule.DataTextField = "rulename";
        //    this.ddlrule.DataBind();
        //}



        //加载基本信息
        private void loadcus()
        {
            string factid = Request.QueryString["id"].ToString();

            EtNet_Models.Factory fact = FactoryManager.getFactoryById(Convert.ToInt32(factid));
            this.cusshortname.Value   = fact.FactshortName.ToString();
            this.cusCName.Value       = fact.FactCName.ToString();
            this.cusCode.Value        = fact.FactCode.ToString();
            this.hidordernum.Value    = fact.Ordernum;
            this.hidcodeformat.Value  = fact.Codeformat;
            this.cusCAddress.Value    = fact.FactCAddress.ToString();
            this.address.Text         = fact.Province.ToString() + " " + fact.City.ToString();
            this.lblMadeFrom.Value    = LoginInfoManager.getLoginInfoById(fact.Inputname).Cname;
            this.lblMadeTime.Value    = fact.Inputdate.ToString("yyyy-MM-dd");
            this.rbUsed.SelectedValue = fact.Used.ToString();
            //this.txtcustype.Text = CusTypeManager.getCusTypeById(cus.CusType).TypeName.ToString();
            int id = fact.FactType;

            if (id > 0)
            {
                this.TxtType.Text = FactTypeManager.getFactTypeById(fact.FactType).TypeName;
            }
            else
            {
                this.TxtType.Text = "";
            }


            this.HidTypeID.Value = fact.FactType.ToString();
            //主要联系人
            this.linkName.Value   = fact.LinkeName.ToString();
            this.linkPost.Value   = fact.Duty.ToString();
            this.linkTel.Value    = fact.Telephone.ToString();
            this.linkMobile.Value = fact.Mobile.ToString();
            this.linkFax.Value    = fact.Fax.ToString();
            this.linkEmail.Value  = fact.Email.ToString();
            this.linkMsn.Value    = fact.QQ.ToString();
            this.linkSkype.Value  = fact.Skype.ToString();

            //主要银行信息
            this.bankName.Value   = fact.Bank.ToString();
            this.bankCard.Value   = fact.AccountID.ToString();
            this.bankMan.Value    = fact.AccountName.ToString();
            this.bankremark.Value = fact.Remark.ToString();
            //加载修改信息
            DataTable dt = FactoryManager.getList(" id =" + factid);

            this.lblEditMan.Value  = dt.Rows[0]["lasteditman"].ToString();
            this.lblEditDate.Value = Convert.IsDBNull(dt.Rows[0]["lasteditdate"]) ? "" : Convert.ToDateTime(dt.Rows[0]["lasteditdate"]).ToString("yyyy-MM-dd");

            //SpecialSet(cusid);
        }
Esempio n. 3
0
        public string LoadZtreeData()
        {
            result += "[{id:999, pId: 0, name:'全部分类" + "', icon:'../../Images/public/bfolder.gif', open: true },";

            IList <FactType> typelist = FactTypeManager.getFactTypeAll();

            foreach (FactType ct in typelist)
            {
                result += "{id:" + ct.Id + ", pId: 999, name: '" + ct.TypeName + "',icon:'../../Images/public/folder.gif'},";
            }
            result = result.TrimEnd(',') + "]";
            return(result);
        }
Esempio n. 4
0
        /// <summary>
        /// 加载类别
        /// </summary>
        public void BindTypes()
        {
            ddltype.Items.Clear();

            IList <FactType> typelist = FactTypeManager.getFactTypeAll();


            for (int i = 0; i < typelist.Count; i++)
            {
                ListItem list = new ListItem(typelist[i].TypeName, typelist[i].Id.ToString());
                ddltype.Items.Add(list);
            }
            ListItem ltem = new ListItem("选择类别", "-1"); //添加第一行默认值

            ddltype.Items.Insert(0, ltem);              //添加第一行默认值
        }
Esempio n. 5
0
        protected void rpCusType_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "Delete")
            {
                string id = e.CommandArgument.ToString();

                IList <Factory> cop = FactoryManager.getFactoryType(Convert.ToInt32(id));

                if (cop.Count > 0)
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('正在使用中的类型不能删除!');", true);
                }
                else
                {
                    FactTypeManager.deleteFactType(Convert.ToInt32(id));
                }
            }
            getType();
        }
Esempio n. 6
0
 protected void imgbtnsave_Click(object sender, ImageClickEventArgs e)
 {
     if (tbxTypeName.Text.ToString() == "")
     {
         this.lblTypename.Text = "<span style='Color:red'>类别名称不能为空!<span>";
     }
     else if (Checktypename(tbxTypeName.Text.ToString()) > 0)
     {
         this.lblTypename.Text = "<span style='Color:red'>类别名称已存在<span>";
     }
     else
     {
         FactType type = new FactType();
         type.TypeName   = this.tbxTypeName.Text.ToString();
         type.Typeremark = this.tbxTypeRemark.Text.ToString();
         FactTypeManager.addFactType(type);
         getAddType();
         this.tbxTypeName.Text = "";
         this.lblTypename.Text = "";
     }
 }
Esempio n. 7
0
 /// <summary>
 /// 类型
 /// </summary>
 /// <param name="userid"></param>
 /// <returns></returns>
 public static string facttype(string id)
 {
     return(FactTypeManager.getFactTypeById(Convert.ToInt32(id)).TypeName);
 }
Esempio n. 8
0
        public int Checktypename(string typename)
        {
            int count = FactTypeManager.getFactTypeBytypename(typename);

            return(count);
        }
Esempio n. 9
0
        private void loadCus()
        {
            string id = Request.QueryString["id"].ToString();

            EtNet_Models.Factory fact = FactoryManager.getFactoryById(Convert.ToInt32(id));
            //基本信息
            this.lblcuscode.Text   = fact.FactCode.ToString() + " ";
            this.lblshortname.Text = fact.FactshortName.ToString() + " ";
            this.lbladdress.Text   = fact.Province.ToString() + " " + fact.City.ToString() + " ";
            this.lblcname.Text     = fact.FactCName.ToString() + " ";

            if (fact.FactType == 0)
            {
                this.lblcustype.Text = "暂未选择类别";
            }
            else
            {
                this.lblcustype.Text = FactTypeManager.getFactTypeById(fact.FactType).TypeName.ToString();
            }

            if (fact.Used == 0)
            {
                this.lblused.Text = "暂未启用";
            }
            else
            {
                this.lblused.Text = "已启用";
            }


            this.lblcaddress.Text = fact.FactCAddress.ToString() + " ";

            //主要联系人
            this.lbllinkname.Text   = fact.LinkeName.ToString() + " ";
            this.lbllinkpost.Text   = fact.Duty.ToString() + " ";
            this.lbllinkfax.Text    = fact.Fax.ToString() + " ";
            this.lbllinkemail.Text  = fact.Email.ToString() + " ";
            this.lbllinkmobile.Text = fact.Mobile.ToString() + " ";
            this.lbllinktel.Text    = fact.Telephone.ToString() + " ";
            this.lbllinkskype.Text  = fact.Skype.ToString() + " ";
            this.lbllinkmsn.Text    = fact.QQ.ToString() + " ";

            //主要银行信息
            this.lblbank.Text     = fact.Bank.ToString() + " ";
            this.lblbankcard.Text = fact.AccountID.ToString() + " ";
            this.lblbankman.Text  = fact.AccountName.ToString() + " ";
            this.lblremark.Text   = fact.Remark.ToString() + " ";


            this.lblMadeFrom.Text = LoginInfoManager.getLoginInfoById(fact.Inputname).Cname;
            this.lblMadeTime.Text = fact.Inputdate.ToString("yyyy-MM-dd");

            //加载修改信息
            DataTable dt = FactoryManager.getList(" id =" + id);

            this.lblEditMan.Text  = dt.Rows[0]["lasteditman"].ToString();
            this.lblEditDate.Text = Convert.IsDBNull(dt.Rows[0]["lasteditdate"]) ? "" : Convert.ToDateTime(dt.Rows[0]["lasteditdate"]).ToString("yyyy-MM-dd");

            loadOtherLink();
            loadOtherBank();
        }