Ejemplo n.º 1
0
    protected void SelectBtn_Click(object sender, EventArgs e)
    {
        try
        {
            ErrorLab.Text = "";
            int id = Convert.ToInt32(CompanyIDTextBox.Text);
            CRM_CustomerUtility ru    = new CRM_CustomerUtility();
            List <CRM_Customer> rList = ru.GetCustomer(id);

            CompanyNameTextBox.Text                   = rList[0].CompanyName;
            CompanyAddressTextBox.Text                = rList[0].CompanyAddress;
            CompanyPhoneTextBox.Text                  = rList[0].CompanyPhone;
            OfficialWebsiteTextBox.Text               = rList[0].OfficialWebsite;
            ContactPersonTextBox.Text                 = rList[0].ContactPerson;
            CP_PhoneTextBox.Text                      = rList[0].CP_Phone;
            CP_EmailTextBox.Text                      = rList[0].CP_Email;
            CompanyScaleDropDownList.SelectedValue    = rList[0].CompanyScale;
            CompanyCategoryDropDownList.SelectedValue = rList[0].CompanyCategory;
        }
        catch (Exception)
        {
            ErrorLab.Text                             = "查無此客戶資料";
            CompanyNameTextBox.Text                   = "";
            CompanyAddressTextBox.Text                = "";
            CompanyPhoneTextBox.Text                  = "";
            OfficialWebsiteTextBox.Text               = "";
            ContactPersonTextBox.Text                 = "";
            CP_PhoneTextBox.Text                      = "";
            CP_EmailTextBox.Text                      = "";
            CompanyScaleDropDownList.SelectedValue    = "未選擇";
            CompanyCategoryDropDownList.SelectedValue = "未選擇";
        }
    }
Ejemplo n.º 2
0
    protected void SelectBtn_Click(object sender, EventArgs e)
    {
        try
        {
            ErrorLab.Text = "";
            int id = Convert.ToInt32(CompanyIDTextBox.Text);
            CRM_CustomerUtility ru    = new CRM_CustomerUtility();
            List <CRM_Customer> rList = ru.GetCustomer(id);

            CompanyNameTextBox.Text = rList[0].CompanyName;
        }
        catch (Exception)
        {
            ErrorLab.Text           = "查無此客戶資料";
            CompanyNameTextBox.Text = "";
        }
    }