Пример #1
0
 /// <summary>
 /// GetForBoris
 /// Calls [usp_select_Login_for_Boris]
 /// </summary>
 public static Login GetForBoris(System.Int32?clientId)
 {
     Rebound.GlobalTrader.DAL.LoginDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Login.GetForBoris(clientId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Login obj = new Login();
         obj.LoginId            = objDetails.LoginId;
         obj.ClientNo           = objDetails.ClientNo;
         obj.ClientName         = objDetails.ClientName;
         obj.EmployeeName       = objDetails.EmployeeName;
         obj.FirstName          = objDetails.FirstName;
         obj.LastName           = objDetails.LastName;
         obj.EMail              = objDetails.EMail;
         obj.ClientCurrencyNo   = objDetails.ClientCurrencyNo;
         obj.ClientCurrencyCode = objDetails.ClientCurrencyCode;
         obj.DivisionNo         = objDetails.DivisionNo;
         obj.DivisionName       = objDetails.DivisionName;
         obj.TeamNo             = objDetails.TeamNo;
         obj.TeamName           = objDetails.TeamName;
         objDetails             = null;
         return(obj);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns a new LoginDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual LoginDetails GetLoginFromReader(DbDataReader reader)
        {
            LoginDetails login = new LoginDetails();

            if (reader.HasRows)
            {
                login.LoginId                = GetReaderValue_Int32(reader, "LoginId", 0);                          //From: [Table]
                login.ClientNo               = GetReaderValue_Int32(reader, "ClientNo", 0);                         //From: [Table]
                login.LoginName              = GetReaderValue_String(reader, "LoginName", "");                      //From: [Table]
                login.EmployeeName           = GetReaderValue_String(reader, "EmployeeName", "");                   //From: [usp_selectAll_Audit_authorisation_for_SalesOrder]
                login.FirstName              = GetReaderValue_String(reader, "FirstName", "");                      //From: [Table]
                login.LastName               = GetReaderValue_String(reader, "LastName", "");                       //From: [Table]
                login.AddressNo              = GetReaderValue_NullableInt32(reader, "AddressNo", null);             //From: [Table]
                login.Title                  = GetReaderValue_String(reader, "Title", "");                          //From: [Table]
                login.Extension              = GetReaderValue_String(reader, "Extension", "");                      //From: [Table]
                login.Telephone              = GetReaderValue_String(reader, "Telephone", "");                      //From: [Table]
                login.Fax                    = GetReaderValue_String(reader, "Fax", "");                            //From: [Table]
                login.EMail                  = GetReaderValue_String(reader, "EMail", "");                          //From: [Table]
                login.Notes                  = GetReaderValue_String(reader, "Notes", "");                          //From: [usp_select_Address_DefaultBilling_for_Company]
                login.HomeTelephone          = GetReaderValue_String(reader, "HomeTelephone", "");                  //From: [Table]
                login.HomeFax                = GetReaderValue_String(reader, "HomeFax", "");                        //From: [Table]
                login.HomeEmail              = GetReaderValue_String(reader, "HomeEmail", "");                      //From: [Table]
                login.Mobile                 = GetReaderValue_String(reader, "Mobile", "");                         //From: [Table]
                login.DivisionNo             = GetReaderValue_Int32(reader, "DivisionNo", 0);                       //From: [usp_select_Contact]
                login.TeamNo                 = GetReaderValue_NullableInt32(reader, "TeamNo", null);                //From: [Table]
                login.Salutation             = GetReaderValue_String(reader, "Salutation", "");                     //From: [Table]
                login.Inactive               = GetReaderValue_Boolean(reader, "Inactive", false);                   //From: [Table]
                login.UpdatedBy              = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);             //From: [Table]
                login.DLUP                   = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);          //From: [Table]
                login.KeyLogin               = GetReaderValue_Boolean(reader, "KeyLogin", false);                   //From: [Table]
                login.MailMessageAddressType = GetReaderValue_String(reader, "MailMessageAddressType", "");         //From: [usp_autosearch_Login_for_Mail]
                login.MailMessageAddressSort = GetReaderValue_String(reader, "MailMessageAddressSort", "");         //From: [usp_autosearch_Login_for_Mail]
                login.DivisionName           = GetReaderValue_String(reader, "DivisionName", "");                   //From: [usp_select_Credit]
                login.TeamName               = GetReaderValue_String(reader, "TeamName", "");                       //From: [usp_select_Company]
                login.ClientName             = GetReaderValue_String(reader, "ClientName", "");                     //From: [Table]
                login.ClientCurrencyNo       = GetReaderValue_NullableInt32(reader, "ClientCurrencyNo", null);      //From: [usp_select_Login_by_Name]
                login.ClientCurrencyCode     = GetReaderValue_String(reader, "ClientCurrencyCode", "");             //From: [usp_select_Login_by_Name]
                login.OpenShippingCost       = GetReaderValue_Double(reader, "OpenShippingCost", 0);                //From: [usp_select_Client_LastMonth_GP]
                login.OpenFreightCharge      = GetReaderValue_Double(reader, "OpenFreightCharge", 0);               //From: [usp_select_Client_LastMonth_GP]
                login.OpenLandedCost         = GetReaderValue_Double(reader, "OpenLandedCost", 0);                  //From: [usp_select_Client_LastMonth_GP]
                login.OpenSalesValue         = GetReaderValue_Double(reader, "OpenSalesValue", 0);                  //From: [usp_select_Client_LastMonth_GP]
                login.ShippedShippingCost    = GetReaderValue_Double(reader, "ShippedShippingCost", 0);             //From: [usp_select_Client_LastMonth_GP]
                login.ShippedFreightCharge   = GetReaderValue_Double(reader, "ShippedFreightCharge", 0);            //From: [usp_select_Client_LastMonth_GP]
                login.ShippedLandedCost      = GetReaderValue_Double(reader, "ShippedLandedCost", 0);               //From: [usp_select_Client_LastMonth_GP]
                login.ShippedSalesValue      = GetReaderValue_Double(reader, "ShippedSalesValue", 0);               //From: [usp_select_Client_LastMonth_GP]
                login.Administrator          = GetReaderValue_NullableBoolean(reader, "Administrator", null);       //From: [usp_selectAll_Login_for_Client_including_Disabled]
                login.NumberOfSalesAccounts  = GetReaderValue_NullableInt32(reader, "NumberOfSalesAccounts", null); //From: [usp_selectAll_Login_for_Client_including_Disabled]
                login.Cost                   = GetReaderValue_NullableDouble(reader, "Cost", null);                 //From: [usp_selectAll_Login_Top_Salespersons]
                login.Resale                 = GetReaderValue_NullableDouble(reader, "Resale", null);               //From: [usp_selectAll_Login_Top_Salespersons]
                login.GrossProfit            = GetReaderValue_NullableDouble(reader, "GrossProfit", null);          //From: [usp_selectAll_Login_Top_Salespersons]
                login.Margin                 = GetReaderValue_NullableDouble(reader, "Margin", null);               //From: [usp_selectAll_Login_Top_Salespersons]
                login.NoOfOrders             = GetReaderValue_NullableInt32(reader, "NoOfOrders", null);            //From: [usp_selectAll_Login_Top_Salespersons]
                login.NoOfCredits            = GetReaderValue_NullableInt32(reader, "NoOfCredits", null);           //From: [usp_selectAll_Login_Top_Salespersons]
            }
            return(login);
        }
Пример #3
0
 /// <summary>
 /// GetByName
 /// Calls [usp_select_Login_by_Name]
 /// </summary>
 public static Login GetByName(System.String loginName)
 {
     Rebound.GlobalTrader.DAL.LoginDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Login.GetByName(loginName);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Login obj = new Login();
         obj.LoginId          = objDetails.LoginId;
         obj.ClientNo         = objDetails.ClientNo;
         obj.LoginName        = objDetails.LoginName;
         obj.EmployeeName     = objDetails.EmployeeName;
         obj.EmployeePassword = objDetails.EmployeePassword;
         obj.FirstName        = objDetails.FirstName;
         obj.LastName         = objDetails.LastName;
         obj.AddressNo        = objDetails.AddressNo;
         obj.Title            = objDetails.Title;
         obj.Extension        = objDetails.Extension;
         obj.Telephone        = objDetails.Telephone;
         obj.Fax                     = objDetails.Fax;
         obj.EMail                   = objDetails.EMail;
         obj.Notes                   = objDetails.Notes;
         obj.HomeTelephone           = objDetails.HomeTelephone;
         obj.HomeFax                 = objDetails.HomeFax;
         obj.HomeEmail               = objDetails.HomeEmail;
         obj.Mobile                  = objDetails.Mobile;
         obj.DivisionNo              = objDetails.DivisionNo;
         obj.TeamNo                  = objDetails.TeamNo;
         obj.Salutation              = objDetails.Salutation;
         obj.Inactive                = objDetails.Inactive;
         obj.UpdatedBy               = objDetails.UpdatedBy;
         obj.DLUP                    = objDetails.DLUP;
         obj.KeyLogin                = objDetails.KeyLogin;
         obj.DivisionName            = objDetails.DivisionName;
         obj.TeamName                = objDetails.TeamName;
         obj.ClientName              = objDetails.ClientName;
         obj.ClientCurrencyNo        = objDetails.ClientCurrencyNo;
         obj.ClientCurrencyCode      = objDetails.ClientCurrencyCode;
         obj.ClientCode              = objDetails.ClientCode;
         obj.ClientLocalCurrencyCode = objDetails.ClientLocalCurrencyCode;
         obj.ADLogin                 = objDetails.ADLogin;
         obj.IsPOHub                 = objDetails.IsPOHub;
         obj.POHubMailGroupId        = objDetails.POHubMailGroupId;
         obj.IsGlobalUser            = objDetails.IsGlobalUser;
         objDetails                  = null;
         return(obj);
     }
 }
Пример #4
0
        /// <summary>
        /// Get
        /// Calls [usp_select_Login]
        /// </summary>
        public static Login Get(System.Int32?loginId)
        {
            Rebound.GlobalTrader.DAL.LoginDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Login.Get(loginId);
            if (objDetails == null)
            {
                return(null);
            }
            else
            {
                Login obj = new Login();
                obj.LoginId          = objDetails.LoginId;
                obj.ClientNo         = objDetails.ClientNo;
                obj.LoginName        = objDetails.LoginName;
                obj.EmployeeName     = objDetails.EmployeeName;
                obj.EmployeePassword = objDetails.EmployeePassword;
                obj.FirstName        = objDetails.FirstName;
                obj.LastName         = objDetails.LastName;
                obj.AddressNo        = objDetails.AddressNo;
                obj.Title            = objDetails.Title;
                obj.Extension        = objDetails.Extension;
                obj.Telephone        = objDetails.Telephone;
                obj.Fax           = objDetails.Fax;
                obj.EMail         = objDetails.EMail;
                obj.Notes         = objDetails.Notes;
                obj.HomeTelephone = objDetails.HomeTelephone;
                obj.HomeFax       = objDetails.HomeFax;
                obj.HomeEmail     = objDetails.HomeEmail;
                obj.Mobile        = objDetails.Mobile;
                obj.DivisionNo    = objDetails.DivisionNo;
                obj.TeamNo        = objDetails.TeamNo;
                obj.Salutation    = objDetails.Salutation;
                obj.Inactive      = objDetails.Inactive;
                obj.UpdatedBy     = objDetails.UpdatedBy;
                obj.DLUP          = objDetails.DLUP;
                obj.KeyLogin      = objDetails.KeyLogin;
                obj.DivisionName  = objDetails.DivisionName;
                obj.TeamName      = objDetails.TeamName;
                obj.PrinterNo     = objDetails.PrinterNo;
                obj.PrinterName   = objDetails.PrinterName;
                obj.LabelPathNo   = objDetails.LabelPathNo;
                obj.LabelPath     = objDetails.LabelPath;
                obj.ADLogin       = objDetails.ADLogin;
                obj.GroupAccess   = objDetails.GroupAccess;
                obj.IsPOHub       = objDetails.IsPOHub;

                objDetails = null;
                return(obj);
            }
        }
Пример #5
0
 /// <summary>
 /// GetName
 /// Calls [usp_select_Login_Name]
 /// </summary>
 public static Login GetName(System.Int32?loginId)
 {
     Rebound.GlobalTrader.DAL.LoginDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Login.GetName(loginId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Login obj = new Login();
         obj.EmployeeName = objDetails.EmployeeName;
         objDetails       = null;
         return(obj);
     }
 }
Пример #6
0
 /// <summary>
 /// GetThisYearGP
 /// Calls [usp_select_Login_ThisYear_GP]
 /// </summary>
 public static Login GetThisYearGP(System.Int32?loginId)
 {
     Rebound.GlobalTrader.DAL.LoginDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Login.GetThisYearGP(loginId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Login obj = new Login();
         obj.OpenShippingCost     = objDetails.OpenShippingCost;
         obj.OpenFreightCharge    = objDetails.OpenFreightCharge;
         obj.OpenLandedCost       = objDetails.OpenLandedCost;
         obj.OpenSalesValue       = objDetails.OpenSalesValue;
         obj.ShippedShippingCost  = objDetails.ShippedShippingCost;
         obj.ShippedFreightCharge = objDetails.ShippedFreightCharge;
         obj.ShippedLandedCost    = objDetails.ShippedLandedCost;
         obj.ShippedSalesValue    = objDetails.ShippedSalesValue;
         objDetails = null;
         return(obj);
     }
 }