コード例 #1
0
ファイル: CompanyDetail.aspx.cs プロジェクト: rokonsr/RMS
        protected void ddlCompanyName_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlCompanyName.SelectedIndex == 0)
            {
                pnlUpdateCompany.Visible = false;
                pnlUpdateCompany.Controls.Clear();
            }
            else
            {
                pnlUpdateCompany.Visible = true;
                objCompanyInfo           = new CompanyInfo();
                objCompanyInfoBiz        = new CompanyInfoBiz();

                byte companyId = Convert.ToByte(ddlCompanyName.SelectedValue);
                objCompanyInfo = objCompanyInfoBiz.GetCompanyInfoForUpdateCompanyInfo(companyId);

                txtUpdateCompanyName.Text    = objCompanyInfo.CompanyName;
                txtUpdateCompanyAddress.Text = objCompanyInfo.CompanyAddress;
                txtUpdateCompanyPhoneNo.Text = objCompanyInfo.CompanyPhone;
                txtUpdateCompanyFax.Text     = objCompanyInfo.CompanyFax;
                txtUpdateCompanyEmail.Text   = objCompanyInfo.CompanyEmail;
                txtUpdateTradeLicense.Text   = objCompanyInfo.TradeLicense;
                txtUpdateTINCertificate.Text = objCompanyInfo.TINCertificate;
                txtUpdateBSTIApproval.Text   = objCompanyInfo.BSTIApproval;
                txtUpdateVATRegNumber.Text   = objCompanyInfo.VATRegNumber;
            }
        }
コード例 #2
0
ファイル: CompanyDetail.aspx.cs プロジェクト: rokonsr/RMS
        private void PopulateDropdownForCompanyName()
        {
            objCompanyNameList = new List <CompanyInfo>();
            objCompanyInfoBiz  = new CompanyInfoBiz();

            objCompanyNameList            = objCompanyInfoBiz.GetCompanyNameList();
            ddlCompanyName.DataSource     = objCompanyNameList;
            ddlCompanyName.DataValueField = "CompanyId";
            ddlCompanyName.DataTextField  = "CompanyName";
            ddlCompanyName.DataBind();
            ddlCompanyName.Items.Insert(0, new ListItem("--Select Company --", "0"));
        }
コード例 #3
0
ファイル: CompanyDetail.aspx.cs プロジェクト: rokonsr/RMS
        private bool EditCompanyInfo()
        {
            objCompanyInfo    = new CompanyInfo();
            objCompanyInfoBiz = new CompanyInfoBiz();

            //byte companyId = Convert.ToByte(ddlCompanyName.SelectedValue);

            objCompanyInfo.CompanyId      = Convert.ToByte(ddlCompanyName.SelectedValue);
            objCompanyInfo.CompanyName    = txtUpdateCompanyName.Text.Trim();
            objCompanyInfo.CompanyAddress = txtUpdateCompanyAddress.Text;
            objCompanyInfo.CompanyPhone   = txtUpdateCompanyPhoneNo.Text;
            objCompanyInfo.CompanyFax     = txtUpdateCompanyFax.Text;
            objCompanyInfo.CompanyEmail   = txtUpdateCompanyEmail.Text;
            objCompanyInfo.TradeLicense   = txtUpdateTradeLicense.Text;
            objCompanyInfo.TINCertificate = txtUpdateTINCertificate.Text;
            objCompanyInfo.BSTIApproval   = txtUpdateBSTIApproval.Text;
            objCompanyInfo.VATRegNumber   = txtUpdateVATRegNumber.Text;
            objCompanyInfo.UpdatedBy      = Convert.ToInt16(Session["UserId"]);

            objCompanyInfoBiz.UpdateCompanyInfo(objCompanyInfo);

            return(true);
        }