protected void UpdateBtn_Click(object sender, EventArgs e)
    {
        CRM_Customer r = new CRM_Customer()
        {
            CompanyID = Convert.ToInt32(CompanyID.Text)
        };

        r.CompanyName     = CompanyName.Text;
        r.CompanyAddress  = CompanyAddress.Text;
        r.CompanyPhone    = CompanyPhone.Text;
        r.OfficialWebsite = OfficialWebsite.Text;
        r.ContactPerson   = ContactPerson.Text;
        r.CP_Phone        = CP_Phone.Text;
        r.CP_Email        = CP_Email.Text;
        r.CompanyScale    = CompanyScale.Text;
        r.CompanyCategory = CompanyCategory.Text;

        CRM_CustomerUtility ru = new CRM_CustomerUtility();

        ru.Update(r);
    }
Example #2
0
    protected void UpdateBtn_Click(object sender, EventArgs e)
    {
        CRM_Customer r = new CRM_Customer()
        {
            CompanyID = Convert.ToInt32(CompanyIDTextBox.Text)
        };

        r.CompanyName     = CompanyNameTextBox.Text;
        r.CompanyAddress  = CompanyAddressTextBox.Text;
        r.CompanyPhone    = CompanyPhoneTextBox.Text;
        r.OfficialWebsite = OfficialWebsiteTextBox.Text;
        r.ContactPerson   = ContactPersonTextBox.Text;
        r.CP_Phone        = CP_PhoneTextBox.Text;
        r.CP_Email        = CP_EmailTextBox.Text;
        r.CompanyScale    = CompanyScaleDropDownList.Text;
        r.CompanyCategory = CompanyCategoryDropDownList.Text;

        CRM_CustomerUtility ru = new CRM_CustomerUtility();

        ru.Update(r);
        ErrorLab.Text = "修改客戶資料成功";
    }