예제 #1
0
    /// <summary>
    /// 初始化页面
    /// </summary>
    /// <param name="CompanyNo"></param>
    private void InitPage(string CompanyNo)
    {
        string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

        txtCompanyCD.Text = companyCD;
        if (string.IsNullOrEmpty(CompanyNo))
        {
            return;
        }
        //修改企业信息
        //获取企业信息
        CompanyBaseInfoModel CompanyBaseInfoModel = new CompanyBaseInfoModel();
        CompanyBaseInfoModel model = CompanyBaseInfoBus.GetCompanyUnitInfo(companyCD, CompanyNo);

        txtCompanyNo.Text   = model.CompanyNo;
        txtCompanyName.Text = model.CompanyName;
        txtDescription.Text = model.Description;
    }
예제 #2
0
    private void BindDrpList()
    {
        DataTable dt_companybaseinfo = CompanyBaseInfoBus.GetCompanyModuleInfo(companyCD);

        if (dt_companybaseinfo != null && dt_companybaseinfo.Rows.Count > 0)
        {
            SuperCompany.Items.Clear();
            foreach (DataRow Row in dt_companybaseinfo.Rows)
            {
                ListItem Province = new ListItem();
                Province.Text  = Row["CompanyName"].ToString();
                Province.Value = Row["ID"].ToString();
                SuperCompany.Items.Add(Province);
            }
            ListItem select = new ListItem();
            select.Text  = "请选择";
            select.Value = "0";
            SuperCompany.Items.Insert(0, select);
        }
    }
예제 #3
0
    protected void btnModify_Click(object sender, EventArgs e)
    {
        CompanyBaseInfoModel Model = new CompanyBaseInfoModel();

        Model.CompanyCD   = companyCD;
        Model.CompanyNo   = this.txtCompanyNo.Text.Trim();
        Model.CompanyName = this.txtCompanyName.Text.Trim();
        Model.Description = this.txtDescription.Text.Trim();
        Model.UsedStatus  = chkUsingFlag.Checked ? "1" : "0";
        if (SuperCompany.Value == "0")
        {
            Model.SuperCompanyID = 0;
        }
        else
        {
            Model.SuperCompanyID = Convert.ToInt32(SuperCompany.Value);
        }
        if (CompanyBaseInfoBus.InsertCompanyBaseInfo(Model))
        {
            Response.Write("添加成功");
        }
    }