Пример #1
0
 /// <summary>
 /// Closed Form Search
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Search_Enquiry_FormClosed(object sender, FormClosedEventArgs e)
 {
     en = new Enquiry(Form_Search_Enquiry.en);
     if (en != null)
     {
         flag_reload           = true;
         txtEnquiry.Text       = en.EnquiryName;
         txtCongty.Text        = en.CompanyName;
         txtKhachHang.Text     = en.CardName;
         txtPhuTrach.EditValue = en.Curator;
         txtSDT.Text           = en.SDT;
         txtEmail.Text         = en.Email;
         txtMoTa.Text          = en.Description;
         cus.ID      = en.CardCode;
         com.ID      = en.CompanyCode;
         flag_reload = false;
     }
     else
     {
         flag_reload           = true;
         txtEnquiry.Text       = "";
         txtCongty.Text        = "";
         txtKhachHang.Text     = "";
         txtPhuTrach.EditValue = null;
         txtSDT.Text           = "";
         txtEmail.Text         = "";
         txtMoTa.Text          = "";
         cus.ID      = "0";
         com.ID      = "0";
         flag_reload = false;
     }
     btnChonvsThoat.Enabled = true;
 }
Пример #2
0
 private void txtCompany_EditValueChanged(object sender, EventArgs e)
 {
     try
     {
         int    rowHandle = txtCustomer.Properties.GetIndexByKeyValue(txtCustomer.EditValue);
         object row       = txtCustomer.Properties.View.GetRow(rowHandle);
         en             = new Enquiry();
         en.ID_Request  = (row as DataRowView).Row["ID_Request"].ToString();
         en.CompanyName = (row as DataRowView).Row["CompanyName"].ToString();
         en.Description = (row as DataRowView).Row["Description"].ToString();
         en.CardName    = (row as DataRowView).Row["CardName"].ToString();
         en.SDT         = (row as DataRowView).Row["SDT"].ToString();
         en.Email       = (row as DataRowView).Row["Email"].ToString();
         en.ID_Enquiry  = (row as DataRowView).Row["ID_Enquiry"].ToString();
         en.EnquiryName = (row as DataRowView).Row["EnquiryName"].ToString();
         en.Curator     = (row as DataRowView).Row["Curator"].ToString();
         en.CuratorName = (row as DataRowView).Row["CuratorName"].ToString();
         en.CompanyCode = (row as DataRowView).Row["Company"].ToString();
         en.CardCode    = (row as DataRowView).Row["CardCode"].ToString();
         en.Address_Cus = (row as DataRowView).Row["Address_Cus"].ToString();
         //   Form_Add_Enquiry.en = en;
         this.Close();
     }
     catch (Exception ex)
     {
         API.API_ERRORLOG(new ERRORLOG(Form_Main.IPAddress, "Form_Search_Enquiry", "txtCompany_EditValueChanged", ex.ToString()));
     }
 }
Пример #3
0
        /// <summary>
        /// push info form to form
        /// </summary>
        private void PushInfo()
        {
            Enquiry ennew = new Enquiry();

            ennew.CardName    = txtKhachHang.Text;
            ennew.ID_Enquiry  = en.ID_Enquiry;
            ennew.SDT         = txtSDT.Text;
            ennew.Curator     = txtPhuTrach.EditValue.ToString();
            ennew.Email       = txtEmail.Text;
            ennew.EnquiryName = txtEnquiry.Text;
            ennew.ID_Request  = en.ID_Request;
            ennew.Description = txtMoTa.Text;
            ennew.CompanyName = txtCongty.Text;
            en = new Enquiry(ennew);
            Form_Enquiry.en = new Enquiry(ennew);
        }
Пример #4
0
 public Enquiry(Enquiry en)
 {
     ID_Request  = en.ID_Request;
     CompanyCode = en.CompanyCode;
     CompanyName = en.CompanyName;
     Description = en.Description;
     CardName    = en.CardName;
     CardCode    = en.CardCode;
     SDT         = en.SDT;
     Email       = en.Email;
     ID_Enquiry  = en.ID_Enquiry;
     EnquiryName = en.EnquiryName;
     Curator     = en.Curator;
     CuratorName = en.CuratorName;
     Address_Cus = en.Address_Cus;
 }
Пример #5
0
 private void Search_Enquiry_FormClosed(object sender, FormClosedEventArgs e)
 {
     en = new Enquiry(Form_Search_Enquiry.en);
     if (en != null && en.EnquiryName != "")
     {
         txtDuAn.Text       = en.EnquiryName;
         flag_edit_Customer = true;
         flag_edit_Company  = true;
         txtToKH.Text       = en.CompanyName;
         txtEmail.Text      = en.Email;
         txtSDT.Text        = en.SDT;
         txtTenKH.Text      = en.CardName;
         txtDiaChi.Text     = en.Address_Cus;
         cus.ID             = en.CardCode;
         com.ID             = en.CompanyCode;
         flag_edit_Customer = false;
         flag_edit_Company  = false;
     }
 }