예제 #1
0
    private bool DoEdit(string _id)
    {
        bool         result = false;
        tbl_supplier model1 = new tbl_supplier();

        model1.GetModel(int.Parse(_id));
        model1.supplyName    = this.name.Text;
        model1.legalName     = this.legelname.Text;
        model1.legalPhone    = this.phone.Text;
        model1.supplyAddress = this.address.Text;
        //model1.supplierProfile = this.content.Value;
        //model1.email = this.email.Text;
        //model1.idCard = this.IDcard.Text;
        model1.Category    = this.category.Text;
        model1.BankName    = this.bankName.Text;
        model1.BankAddress = this.bankaderess.Text;
        model1.BankNo      = this.bankno.Text;

        if (model1.Update())
        {
            result = true;
        }

        return(result);
    }
예제 #2
0
    //#region 绑定国家=================================
    //private void cnBind()
    //{
    //    tbl_huilv bll = new tbl_huilv();
    //    DataTable dt = bll.GetList("1=1   order by sort_id").Tables[0];
    //    this.country.Items.Clear();
    //    this.country.Items.Add(new ListItem("请选择国家...", "0"));
    //    foreach (DataRow dr in dt.Rows)
    //    {
    //        string Id = dr["id"].ToString();
    //        string Title = dr["country"].ToString().Trim();
    //        this.country.Items.Add(new ListItem(Title, Id));
    //    }

    //}
    //#endregion
    //#region 绑定银行=================================
    //private void yhBind()
    //{
    //    tbl_reg_bank bll = new tbl_reg_bank();
    //    DataTable dt = bll.GetList("1=1   order by sort_id").Tables[0];
    //    this.huiyuan_yinhang.Items.Clear();
    //    this.huiyuan_yinhang.Items.Add(new ListItem("请选择银行...", ""));
    //    foreach (DataRow dr in dt.Rows)
    //    {
    //        string Id = dr["bank_name"].ToString();
    //        string Title = dr["bank_name"].ToString().Trim();
    //        this.huiyuan_yinhang.Items.Add(new ListItem(Title, Id));
    //    }
    //}
    //#endregion



    #region 赋值操作=================================
    private void ShowInfo(string _id)
    {
        tbl_supplier model1 = new tbl_supplier();

        model1.GetModel(int.Parse(_id));
        this.name.Text      = model1.supplyName;
        this.legelname.Text = model1.legalName;
        this.phone.Text     = model1.legalPhone;
        this.address.Text   = model1.supplyAddress;
        //this.content.Value = model1.supplierProfile;
        //this.email.Text = model1.email;
        //this.IDcard.Text = model1.idCard;
        Image1.ImageUrl       = model1.businessNO;
        Image2.ImageUrl       = model1.SupplyImg;
        this.category.Text    = model1.Category;
        this.bankName.Text    = model1.BankName;
        this.bankaderess.Text = model1.BankAddress;
        this.bankno.Text      = model1.BankNo;
    }
예제 #3
0
    private bool DoDelete(string _id)
    {
        bool         result = false;
        string       hui_id = null;
        tbl_supplier model1 = new tbl_supplier();

        model1.GetModel(int.Parse(_id));
        hui_id = model1.huiyuan_id;
        if (model1.Delete(int.Parse(_id)))
        {
            tbl_huiyuan model = new tbl_huiyuan();
            model.GetModel_hui_id(hui_id);
            model.supply = 0;
            model.Update();
            result = true;
        }

        return(result);
    }