private void ClearCustomer()
 {
     txtCustomerName.Text  = "";
     txtPhoneNumber.Text   = "";
     txtBillingDate.Text   = DateTime.Now.Date.ToString();
     txtBillingAmount.Text = "";
     txtAddress.Text       = "";
     cust = FactoryCustomerLookup.Create(cmbCustomerType.Text);
 }
 public void SetCustomer()
 {
     cust = FactoryCustomerLookup.Create(UIControls["cmbCustomerType"].Text);
     cust.CustomerName = UIControls["txtCustomerName"].Text;
     cust.PhoneNumber  = UIControls["txtPhoneNumber"].Text;
     cust.BillDate     = Convert.ToDateTime(UIControls["txtBillingDate"].Text);
     cust.BillAmount   = Convert.ToDecimal(UIControls["txtBillingAmount"].Text);
     cust.Address      = UIControls["txtAddress"].Text;
 }
 public void ClearCustomer()
 {
     UIControls["txtCustomerName"].Text  = "";
     UIControls["txtPhoneNumber"].Text   = "";
     UIControls["txtBillingDate"].Text   = DateTime.Now.Date.ToString();
     UIControls["txtBillingAmount"].Text = "";
     UIControls["txtAddress"].Text       = "";
     cust = FactoryCustomerLookup.
            Create(
         UIControls["cmbCustomerType"].Text);
 }
        protected override List <CustomerBase> ExecuteCommand()
        {
            objCommand.CommandText = "select * from tblCustomer";
            SqlDataReader dr = null;

            dr = objCommand.ExecuteReader();
            AnyTypes.Clear();
            while (dr.Read())
            {
                CustomerBase icust = FactoryCustomerLookup.Create("Customer");
                icust.Id           = Convert.ToInt16(dr["Id"]);
                icust.CustomerType = dr["CustomerType"].ToString();
                icust.CustomerName = dr["CustomerName"].ToString();
                icust.BillDate     = Convert.ToDateTime(dr["BillDate"]);
                icust.BillAmount   = Convert.ToDecimal(dr["BillAmount"]);
                icust.PhoneNumber  = dr["PhoneNumber"].ToString();
                icust.Address      = dr["Address"].ToString();
                AnyTypes.Add(icust);
            }
            return(AnyTypes);
        }