示例#1
0
        public SysConfigDetails get_SysConfigDetails()
        {
            SysConfigDetails clsSysConfigDetails = new SysConfigDetails();

            clsSysConfigDetails.BACKEND_VARIATION_TYPE = get_BackendVariationType();
            clsSysConfigDetails.BACKEND_VARIATION_TYPE_EXPIRATION_LOTNO = get_BackendVariationTypeExpirationLotNo();
            clsSysConfigDetails.BECompanyCode = get_BECompanyCode();
            clsSysConfigDetails.CompanyCode   = get_CompanyCode();
            clsSysConfigDetails.CompanyName   = get_CompanyName();

            clsSysConfigDetails.Currency          = get_Currency();
            clsSysConfigDetails.TIN               = get_TIN();
            clsSysConfigDetails.VersionFTPAddress = get_VersionFTPIPAddress();

            clsSysConfigDetails.CheckOutBillHeaderLabel           = get_CheckOutBillHeaderLabel();
            clsSysConfigDetails.ChargeSlipHeaderLabel             = get_ChargeSlipHeaderLabel();
            clsSysConfigDetails.CreditVerificationSlipHeaderLabel = get_CreditVerificationSlipHeaderLabel();
            clsSysConfigDetails.WillPrintCreditPaymentHeader      = get_WillPrintCreditPaymentHeader();
            clsSysConfigDetails.WillWriteSystemLog = get_WillWriteSystemLog();

            clsSysConfigDetails.WillDeductTFInXRead                       = get_WillDeductTFInXRead();
            clsSysConfigDetails.WillDeductTFInZRead                       = get_WillDeductTFInZRead();
            clsSysConfigDetails.WillDeductTFInTerminalReport              = get_WillDeductTFInTerminalReport();
            clsSysConfigDetails.WillAskDoNotPrintTransactionDate          = get_WillAskDoNotPrintTransactionDate();
            clsSysConfigDetails.WillShowProductTotalQuantityInItemSelect  = get_WillShowProductTotalQuantityInItemSelect();
            clsSysConfigDetails.WillShowProductBranchQuantityInItemSelect = get_WillShowProductBranchQuantityInItemSelect();
            clsSysConfigDetails.WillNotPrintReprintMessage                = get_WillNotPrintReprintMessage();
            clsSysConfigDetails.WillDepositChangeOfCreditPayment          = get_WillDepositChangeOfCreditPayment();
            clsSysConfigDetails.CreditPaymentType                        = get_CreditPaymentType();
            clsSysConfigDetails.AllowDebitPayment                        = get_AllowDebitPayment();
            clsSysConfigDetails.AllowRewardPointsPayment                 = get_AllowRewardPointsPayment();
            clsSysConfigDetails.AllowDiscountGreaterThanAmount           = get_AllowDiscountGreaterThanAmount();
            clsSysConfigDetails.AllowZeroAmountTransaction               = get_AllowZeroAmountTransaction();
            clsSysConfigDetails.AllowMoreThan1ItemIfConsignment          = get_AllowMoreThan1ItemIfConsignment();
            clsSysConfigDetails.WillProcessCreditBillerInProgram         = get_WillProcessCreditBillerInProgram();
            clsSysConfigDetails.WillConvertWeightMeasurementTo1InQtySold = get_WillConvertWeightMeasurementTo1InQtySold();
            clsSysConfigDetails.WeightMeasurement                        = get_WeightMeasurement();
            clsSysConfigDetails.isDefaultButtonYesInPrintTransaction     = get_isDefaultButtonYesInPrintTransaction();
            clsSysConfigDetails.OutOfStockCustomerCode                   = get_OutOfStockCustomerCode();
            clsSysConfigDetails.WalkInCustomerCode                       = get_WalkInCustomerCode();
            clsSysConfigDetails.ChequePaymentAcceptableNoOfDays          = get_ChequePaymentAcceptableNoOfDays();
            clsSysConfigDetails.EnablePriceLevel              = get_EnablePriceLevel();
            clsSysConfigDetails.ORHeader                      = get_ORHeader();
            clsSysConfigDetails.InventoryTrustFund            = get_INVENTORYTRUSTFUND();
            clsSysConfigDetails.ContactAddWndType             = get_CONTACT_ADDWND_TYPE();
            clsSysConfigDetails.ItemSelectWndColumnType       = get_ITEMSELECTWND_COLUMN_TYPE();
            clsSysConfigDetails.ItemSelectWndColumnSearchType = get_ITEMSELECTWND_COLUMN_SEARCH_TYPE();
            clsSysConfigDetails.BSDDiscountCode               = get_BSDDiscountCode();
            clsSysConfigDetails.BSDDiscountCodeDinerCount     = get_BSDDiscountCodeDinerCount();
            clsSysConfigDetails.ProdLastSyncDateTime          = get_ProdLastSyncDateTime();
            clsSysConfigDetails.ProdSyncInterval              = get_ProdSyncInterval();

            return(clsSysConfigDetails);
        }
示例#2
0
        public Int32 Save(SysConfigDetails Details)
        {
            try
            {
                string SQL = "CALL procSaveSysConfig(@ConfigName, @ConfigValue, @Category, @CreatedOn, @LastModified);";

                MySqlCommand cmd = new MySqlCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                cmd.CommandText = SQL;

                cmd.Parameters.AddWithValue("Configname", Details.ConfigName);
                cmd.Parameters.AddWithValue("ConfigValue", Details.ConfigValue);
                cmd.Parameters.AddWithValue("Category", Details.Category);
                cmd.Parameters.AddWithValue("CreatedOn", Details.CreatedOn == DateTime.MinValue ? Constants.C_DATE_MIN_VALUE : Details.CreatedOn);
                cmd.Parameters.AddWithValue("LastModified", Details.LastModified == DateTime.MinValue ? Constants.C_DATE_MIN_VALUE : Details.LastModified);

                return(base.ExecuteNonQuery(cmd));
            }

            catch (Exception ex)
            {
                throw base.ThrowException(ex);
            }
        }
示例#3
0
        public void AssignUserSession(Int64 UID)
        {
            AccessUser        clsAccessUser = new AccessUser();
            AccessUserDetails clsDetails    = clsAccessUser.Details(UID);

            clsAccessUser.CommitAndDispose();

            Session.RemoveAll();
            Session.Add("BranchID", Constants.BRANCH_ID_MAIN);
            Session.Add("TerminalNo", Constants.C_DEFAULT_TERMINAL_01);

            Session.Add("AccessUserDetails", clsDetails);

            Session.Add("PageSize", clsDetails.PageSize);
            Session.Add("UID", UID);
            Session.Add("UserName", clsDetails.UserName);
            Session.Add("Password", clsDetails.Password);
            Session.Add("Name", clsDetails.Name);

            Session.Add("CountryID", clsDetails.CountryID);

            Session.Add("Addres1", clsDetails.Address1);
            Session.Add("Addres2", clsDetails.Address2);
            Session.Add("City", clsDetails.City);
            Session.Add("State", clsDetails.State);
            Session.Add("OfficePhone", clsDetails.OfficePhone);
            Session.Add("DirectPhone", clsDetails.DirectPhone);
            Session.Add("HomePhone", clsDetails.HomePhone);
            Session.Add("FaxPhone", clsDetails.FaxPhone);
            Session.Add("MobilePhone", clsDetails.MobilePhone);
            Session.Add("EmailAddress", clsDetails.EmailAddress);

            //Data.SysConfig clsSysConfig = new Data.SysConfig();
            //Session.Add(Constants.SYS_CONFIG_BACKEND_VARIATION_TYPE, clsSysConfig.get_BackendVariationType());
            //clsSysConfig.CommitAndDispose();

            //overwrite the companydetails from the database
            Data.SysConfig        clsSysConfig        = new Data.SysConfig();
            Data.SysConfigDetails clsSysConfigDetails = clsSysConfig.get_SysConfigDetails();
            clsSysConfig.CommitAndDispose();

            Session.Add(Constants.SYS_CONFIG_BACKEND_VARIATION_TYPE, clsSysConfigDetails.BACKEND_VARIATION_TYPE);

            CompanyDetails.BECompanyCode = string.IsNullOrEmpty(clsSysConfigDetails.BECompanyCode) ? CompanyDetails.BECompanyCode : clsSysConfigDetails.BECompanyCode;
            CompanyDetails.CompanyCode   = string.IsNullOrEmpty(clsSysConfigDetails.CompanyCode) ? CompanyDetails.CompanyCode : clsSysConfigDetails.CompanyCode;
            CompanyDetails.CompanyName   = string.IsNullOrEmpty(clsSysConfigDetails.CompanyName) ? CompanyDetails.CompanyName : clsSysConfigDetails.CompanyName;
            CompanyDetails.Currency      = string.IsNullOrEmpty(clsSysConfigDetails.Currency) ? CompanyDetails.Currency : clsSysConfigDetails.Currency;
            CompanyDetails.TIN           = string.IsNullOrEmpty(clsSysConfigDetails.TIN) ? CompanyDetails.TIN : clsSysConfigDetails.TIN;

            CompanyDetails.Address1     = string.IsNullOrEmpty(clsSysConfigDetails.Address1) ? CompanyDetails.Address1 : clsSysConfigDetails.Address1;
            CompanyDetails.Address2     = string.IsNullOrEmpty(clsSysConfigDetails.Address2) ? CompanyDetails.Address2 : clsSysConfigDetails.Address2;
            CompanyDetails.City         = string.IsNullOrEmpty(clsSysConfigDetails.City) ? CompanyDetails.City : clsSysConfigDetails.City;
            CompanyDetails.State        = string.IsNullOrEmpty(clsSysConfigDetails.State) ? CompanyDetails.State : clsSysConfigDetails.State;
            CompanyDetails.Zip          = string.IsNullOrEmpty(clsSysConfigDetails.Zip) ? CompanyDetails.Zip : clsSysConfigDetails.Zip;
            CompanyDetails.Country      = string.IsNullOrEmpty(clsSysConfigDetails.Country) ? CompanyDetails.Country : clsSysConfigDetails.Country;
            CompanyDetails.OfficePhone  = string.IsNullOrEmpty(clsSysConfigDetails.OfficePhone) ? CompanyDetails.OfficePhone : clsSysConfigDetails.OfficePhone;
            CompanyDetails.DirectPhone  = string.IsNullOrEmpty(clsSysConfigDetails.DirectPhone) ? CompanyDetails.DirectPhone : clsSysConfigDetails.DirectPhone;
            CompanyDetails.FaxPhone     = string.IsNullOrEmpty(clsSysConfigDetails.FaxPhone) ? CompanyDetails.FaxPhone : clsSysConfigDetails.FaxPhone;
            CompanyDetails.MobilePhone  = string.IsNullOrEmpty(clsSysConfigDetails.MobilePhone) ? CompanyDetails.MobilePhone : clsSysConfigDetails.MobilePhone;
            CompanyDetails.EmailAddress = string.IsNullOrEmpty(clsSysConfigDetails.EmailAddress) ? CompanyDetails.EmailAddress : clsSysConfigDetails.EmailAddress;
            CompanyDetails.WebSite      = string.IsNullOrEmpty(clsSysConfigDetails.WebSite) ? CompanyDetails.WebSite : clsSysConfigDetails.WebSite;
        }
示例#4
0
        public Int32 Save(SysConfigDetails Details)
        {
            try
            {
                string SQL = "CALL procSaveSysConfig(@ConfigName, @ConfigValue, @Category, @CreatedOn, @LastModified);";

                MySqlCommand cmd = new MySqlCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                cmd.CommandText = SQL;

                cmd.Parameters.AddWithValue("Configname", Details.ConfigName);
                cmd.Parameters.AddWithValue("ConfigValue", Details.ConfigValue);
                cmd.Parameters.AddWithValue("Category", Details.Category);
                cmd.Parameters.AddWithValue("CreatedOn", Details.CreatedOn == DateTime.MinValue ? Constants.C_DATE_MIN_VALUE : Details.CreatedOn);
                cmd.Parameters.AddWithValue("LastModified", Details.LastModified == DateTime.MinValue ? Constants.C_DATE_MIN_VALUE : Details.LastModified);

                return base.ExecuteNonQuery(cmd);
            }

            catch (Exception ex)
            {
                throw base.ThrowException(ex);
            }	
        }
示例#5
0
        public SysConfigDetails get_SysConfigDetails()
        {
            SysConfigDetails clsSysConfigDetails = new SysConfigDetails();
            
            clsSysConfigDetails.BACKEND_VARIATION_TYPE = get_BackendVariationType();
            clsSysConfigDetails.BACKEND_VARIATION_TYPE_EXPIRATION_LOTNO = get_BackendVariationTypeExpirationLotNo();
            clsSysConfigDetails.BECompanyCode = get_BECompanyCode();
            clsSysConfigDetails.CompanyCode = get_CompanyCode();
            clsSysConfigDetails.CompanyName = get_CompanyName();
            
            clsSysConfigDetails.Currency = get_Currency();
            clsSysConfigDetails.TIN = get_TIN();
            clsSysConfigDetails.VersionFTPAddress = get_VersionFTPIPAddress();

            clsSysConfigDetails.CheckOutBillHeaderLabel = get_CheckOutBillHeaderLabel();
            clsSysConfigDetails.ChargeSlipHeaderLabel = get_ChargeSlipHeaderLabel();
            clsSysConfigDetails.CreditVerificationSlipHeaderLabel = get_CreditVerificationSlipHeaderLabel();
            clsSysConfigDetails.WillPrintCreditPaymentHeader = get_WillPrintCreditPaymentHeader();
            clsSysConfigDetails.WillWriteSystemLog = get_WillWriteSystemLog();

            clsSysConfigDetails.WillDeductTFInXRead = get_WillDeductTFInXRead();
            clsSysConfigDetails.WillDeductTFInZRead = get_WillDeductTFInZRead();
            clsSysConfigDetails.WillDeductTFInTerminalReport = get_WillDeductTFInTerminalReport();
            clsSysConfigDetails.WillAskDoNotPrintTransactionDate = get_WillAskDoNotPrintTransactionDate();
            clsSysConfigDetails.WillShowProductTotalQuantityInItemSelect = get_WillShowProductTotalQuantityInItemSelect();
            clsSysConfigDetails.WillShowProductBranchQuantityInItemSelect = get_WillShowProductBranchQuantityInItemSelect();
            clsSysConfigDetails.WillNotPrintReprintMessage = get_WillNotPrintReprintMessage();
            clsSysConfigDetails.WillDepositChangeOfCreditPayment = get_WillDepositChangeOfCreditPayment();
            clsSysConfigDetails.CreditPaymentType = get_CreditPaymentType();
            clsSysConfigDetails.AllowDebitPayment = get_AllowDebitPayment();
            clsSysConfigDetails.AllowRewardPointsPayment = get_AllowRewardPointsPayment();
            clsSysConfigDetails.AllowDiscountGreaterThanAmount= get_AllowDiscountGreaterThanAmount();
            clsSysConfigDetails.AllowZeroAmountTransaction = get_AllowZeroAmountTransaction();
            clsSysConfigDetails.AllowMoreThan1ItemIfConsignment = get_AllowMoreThan1ItemIfConsignment();
            clsSysConfigDetails.WillProcessCreditBillerInProgram = get_WillProcessCreditBillerInProgram();
            clsSysConfigDetails.WillConvertWeightMeasurementTo1InQtySold = get_WillConvertWeightMeasurementTo1InQtySold();
            clsSysConfigDetails.WeightMeasurement = get_WeightMeasurement();
            clsSysConfigDetails.isDefaultButtonYesInPrintTransaction = get_isDefaultButtonYesInPrintTransaction();
            clsSysConfigDetails.OutOfStockCustomerCode = get_OutOfStockCustomerCode();
            clsSysConfigDetails.WalkInCustomerCode = get_WalkInCustomerCode();
            clsSysConfigDetails.ChequePaymentAcceptableNoOfDays = get_ChequePaymentAcceptableNoOfDays();
            clsSysConfigDetails.EnablePriceLevel = get_EnablePriceLevel();
            clsSysConfigDetails.ORHeader = get_ORHeader();
            clsSysConfigDetails.InventoryTrustFund = get_INVENTORYTRUSTFUND();
            clsSysConfigDetails.ContactAddWndType = get_CONTACT_ADDWND_TYPE();
            clsSysConfigDetails.ItemSelectWndColumnType = get_ITEMSELECTWND_COLUMN_TYPE();
            clsSysConfigDetails.ItemSelectWndColumnSearchType = get_ITEMSELECTWND_COLUMN_SEARCH_TYPE();
            clsSysConfigDetails.BSDDiscountCode = get_BSDDiscountCode();
            clsSysConfigDetails.BSDDiscountCodeDinerCount = get_BSDDiscountCodeDinerCount();
            clsSysConfigDetails.ProdLastSyncDateTime = get_ProdLastSyncDateTime();
            clsSysConfigDetails.ProdSyncInterval = get_ProdSyncInterval();

            return clsSysConfigDetails;
        }