Exemple #1
0
        public objCustomer SelectByCustomerAccountId(int customerAccountId)
        {
            IDataReader idr = db.SelectByCustomerAccountId(customerAccountId);
            objCustomer rt  = new objCustomer();

            rt = Select_Obj(idr);
            return(rt);
        }
Exemple #2
0
        public objCustomer Select(string customerURL)
        {
            objCustomer o   = new objCustomer();
            IDataReader idr = db.Select(customerURL);

            o = Select_Obj(idr);
            return(o);
        }
Exemple #3
0
        public objCustomer Select(int customerId)
        {
            objCustomer o   = new objCustomer();
            IDataReader idr = db.Select(customerId);

            o = Select_Obj(idr);
            return(o);
        }
Exemple #4
0
        public void Add(objCustomer i)
        {
            int customerId = db.Add(
                i.customerId, i.customerCode, i.customerURL, i.customerTitle, i.customerDescription, i.customerProductType, i.customerAddressLine1, i.customerAddressLine2, i.customerCity, i.customerZip, i.customerState, i.customerStateShortcode, i.customerCountry, i.customerCountryShortcode, i.customerIsActive, i.customerEmail, i.customerEmailAlt, i.customerPhone, i.customerPhoneAlt, i.customerMinQty, i.customerMaxQty, i.customerOrderIntimationEmal, i.customerSampleIntimationEmail, i.customerFTP, i.customerFtpUsername, i.customerFtpPassword, i.customerSendOnFtp, i.customerFirstName, i.customerLastName, i.customerAccountId, i.customerCreatedOn, i.customerCreatedBy, i.customerCreatedIP);

            //Integration.FinWithErp.Customers bICustomer = new Integration.FinWithErp.Customers();
            //bICustomer.Create_Account(customerId);
        }
Exemple #5
0
        private objCustomer Select_Obj(IDataReader idr)
        {
            objCustomer o      = new objCustomer();
            bool        rtNull = true;

            if (idr != null)
            {
                while (idr.Read())
                {
                    rtNull = false;

                    if (idr["customerId"] != DBNull.Value)
                    {
                        o.customerId = Convert.ToInt32(idr["customerId"]);
                    }
                    if (idr["customerCode"] != DBNull.Value)
                    {
                        o.customerCode = Convert.ToString(idr["customerCode"]);
                    }
                    if (idr["customerURL"] != DBNull.Value)
                    {
                        o.customerURL = Convert.ToString(idr["customerURL"]);
                    }
                    if (idr["customerTitle"] != DBNull.Value)
                    {
                        o.customerTitle = Convert.ToString(idr["customerTitle"]);
                    }
                    if (idr["customerDescription"] != DBNull.Value)
                    {
                        o.customerDescription = Convert.ToString(idr["customerDescription"]);
                    }
                    if (idr["customerProductType"] != DBNull.Value)
                    {
                        o.customerProductType = Convert.ToInt32(idr["customerProductType"]);
                    }
                    if (idr["customerAddressLine1"] != DBNull.Value)
                    {
                        o.customerAddressLine1 = Convert.ToString(idr["customerAddressLine1"]);
                    }
                    if (idr["customerAddressLine2"] != DBNull.Value)
                    {
                        o.customerAddressLine2 = Convert.ToString(idr["customerAddressLine2"]);
                    }
                    if (idr["customerCity"] != DBNull.Value)
                    {
                        o.customerCity = Convert.ToString(idr["customerCity"]);
                    }
                    if (idr["customerZip"] != DBNull.Value)
                    {
                        o.customerZip = Convert.ToString(idr["customerZip"]);
                    }
                    if (idr["customerState"] != DBNull.Value)
                    {
                        o.customerState = Convert.ToString(idr["customerState"]);
                    }
                    if (idr["customerStateShortcode"] != DBNull.Value)
                    {
                        o.customerStateShortcode = Convert.ToString(idr["customerStateShortcode"]);
                    }
                    if (idr["customerCountry"] != DBNull.Value)
                    {
                        o.customerCountry = Convert.ToString(idr["customerCountry"]);
                    }
                    if (idr["customerCountryShortcode"] != DBNull.Value)
                    {
                        o.customerCountryShortcode = Convert.ToString(idr["customerCountryShortcode"]);
                    }
                    if (idr["customerIsActive"] != DBNull.Value)
                    {
                        o.customerIsActive = Convert.ToBoolean(idr["customerIsActive"]);
                    }
                    if (idr["customerEmail"] != DBNull.Value)
                    {
                        o.customerEmail = Convert.ToString(idr["customerEmail"]);
                    }
                    if (idr["customerEmailAlt"] != DBNull.Value)
                    {
                        o.customerEmailAlt = Convert.ToString(idr["customerEmailAlt"]);
                    }
                    if (idr["customerPhone"] != DBNull.Value)
                    {
                        o.customerPhone = Convert.ToString(idr["customerPhone"]);
                    }
                    if (idr["customerPhoneAlt"] != DBNull.Value)
                    {
                        o.customerPhoneAlt = Convert.ToString(idr["customerPhoneAlt"]);
                    }
                    if (idr["customerMinQty"] != DBNull.Value)
                    {
                        o.customerMinQty = Convert.ToInt32(idr["customerMinQty"]);
                    }
                    if (idr["customerMaxQty"] != DBNull.Value)
                    {
                        o.customerMaxQty = Convert.ToInt32(idr["customerMaxQty"]);
                    }
                    if (idr["customerOrderIntimationEmal"] != DBNull.Value)
                    {
                        o.customerOrderIntimationEmal = Convert.ToString(idr["customerOrderIntimationEmal"]);
                    }
                    if (idr["customerSampleIntimationEmail"] != DBNull.Value)
                    {
                        o.customerSampleIntimationEmail = Convert.ToString(idr["customerSampleIntimationEmail"]);
                    }
                    if (idr["customerFTP"] != DBNull.Value)
                    {
                        o.customerFTP = Convert.ToString(idr["customerFTP"]);
                    }
                    if (idr["customerFtpUsername"] != DBNull.Value)
                    {
                        o.customerFtpUsername = Convert.ToString(idr["customerFtpUsername"]);
                    }
                    if (idr["customerFtpPassword"] != DBNull.Value)
                    {
                        o.customerFtpPassword = Convert.ToString(idr["customerFtpPassword"]);
                    }
                    if (idr["customerSendOnFtp"] != DBNull.Value)
                    {
                        o.customerSendOnFtp = Convert.ToBoolean(idr["customerSendOnFtp"]);
                    }
                    if (idr["customerFirstName"] != DBNull.Value)
                    {
                        o.customerFirstName = idr["customerFirstName"].ToString();
                    }
                    if (idr["customerLastName"] != DBNull.Value)
                    {
                        o.customerLastName = idr["customerLastName"].ToString();
                    }
                    if (idr["customerAccountId"] != DBNull.Value)
                    {
                        o.customerAccountId = Convert.ToInt32(idr["customerAccountId"]);
                    }
                    if (idr["customerCreatedOn"] != DBNull.Value)
                    {
                        o.customerCreatedOn = Convert.ToDateTime(idr["customerCreatedOn"]);
                    }
                    if (idr["customerCreatedBy"] != DBNull.Value)
                    {
                        o.customerCreatedBy = Convert.ToInt32(idr["customerCreatedBy"]);
                    }
                    if (idr["customerCreatedIP"] != DBNull.Value)
                    {
                        o.customerCreatedIP = Convert.ToString(idr["customerCreatedIP"]);
                    }
                }
            }

            if (rtNull)
            {
                o = null;
            }

            return(o);
        }
Exemple #6
0
 public void Update(objCustomer i)
 {
     db.Update(
         i.customerId, i.customerCode, i.customerURL, i.customerTitle, i.customerDescription, i.customerProductType, i.customerAddressLine1, i.customerAddressLine2, i.customerCity, i.customerZip, i.customerState, i.customerStateShortcode, i.customerCountry, i.customerCountryShortcode, i.customerIsActive, i.customerEmail, i.customerEmailAlt, i.customerPhone, i.customerPhoneAlt, i.customerMinQty, i.customerMaxQty, i.customerOrderIntimationEmal, i.customerSampleIntimationEmail, i.customerFTP, i.customerFtpUsername, i.customerFtpPassword, i.customerSendOnFtp, i.customerFirstName, i.customerLastName, i.customerAccountId, i.customerCreatedOn, i.customerCreatedBy, i.customerCreatedIP);
 }