Esempio n. 1
0
        public static GlobalCost GetGlobalCost()
        {
            using (var reader = DataCommand.Create().ExecuteReader("dbo.GlobalCost_Select"))
            {
                GlobalCost gc = new GlobalCost();

                if (reader.Read())
                {
                    gc.LabAccountID               = Convert.ToInt32(reader["LabAccountID"]);
                    gc.LabCreditAccountID         = Convert.ToInt32(reader["labCreditAccountID"]);
                    gc.Number                     = Convert.ToString(reader["Number"]);
                    gc.ShortCode                  = Convert.ToString(reader["ShortCode"]);
                    gc.SubsidyCreditAccountNumber = Convert.ToString(reader["SubsidyCreditAccountNumber"]);
                }
                else
                {
                    //Make sure we know something is wrong
                    gc.LabAccountID       = -1;
                    gc.LabCreditAccountID = -1;
                    gc.Number             = string.Empty;
                    gc.ShortCode          = string.Empty;
                }

                reader.Close();

                return(gc);
            }
        }
 public static DataTable GetClientBillingTypesByPeriod(DateTime period)
 {
     return(DataCommand.Create()
            .Param("Action", "GetClientBillingTypeByPeriod")
            .Param("Period", period)
            .FillDataTable("dbo.ClientOrgBillingTypeTS_Select"));
 }
Esempio n. 3
0
 public static DataTable GetAllAccountsByClientOrgID(int clientOrgId)
 {
     return(DataCommand.Create()
            .Param("Action", "GetAllAccountsByClientOrgID")
            .Param("ClientOrgID", clientOrgId)
            .FillDataTable("dbo.Account_Select"));
 }
Esempio n. 4
0
 /// <summary>
 /// [2009-09-16] email notify to all engineers who opted to receieive email on practice reservation
 /// </summary>
 public static DataTable SelectNotifyOnPracticeRes(int resourceId)
 {
     return(DataCommand.Create()
            .Param("Action", "SelectNotifyOnPracticeRes")
            .Param("ResourceID", resourceId)
            .FillDataTable("sselScheduler.dbo.procResourceClientSelect"));
 }
Esempio n. 5
0
 public static DataTable GetAddressByAccountID(int accountId)
 {
     return(DataCommand.Create()
            .Param("Action", "ByAccount")
            .Param("AccountID", accountId)
            .FillDataTable("dbo.Address_Select"));
 }
Esempio n. 6
0
 /// <summary>
 /// Returns all resource clients and their emails and affiliations
 /// </summary>
 public static ExecuteReaderResult SelectClientList(int resourceId)
 {
     return(DataCommand.Create()
            .Param("Action", "SelectClientList")
            .Param("ResourceID", resourceId)
            .ExecuteReader("sselScheduler.dbo.procResourceClientSelect"));
 }
Esempio n. 7
0
 /// <summary>
 /// Returns all resources associated with the specified client
 /// </summary>
 public static DataTable SelectByClient(int clientId)
 {
     return(DataCommand.Create()
            .Param("Action", "SelectByClient")
            .Param("ClientID", clientId)
            .FillDataTable("sselScheduler.dbo.procResourceClientSelect"));
 }
Esempio n. 8
0
 /// <summary>
 ///  Returns all tool engineers from the specified resource
 /// </summary>
 public static DataTable SelectEngineers(int resourceId = -1)
 {
     return(DataCommand.Create()
            .Param("Action", "SelectEngineers")
            .Param("ResourceID", resourceId)
            .FillDataTable("sselScheduler.dbo.procResourceClientSelect"));
 }
Esempio n. 9
0
 /// <summary>
 /// Returns all emails from the specified resource - jiac 12/15/07
 /// </summary>
 public static DataTable SelectEmails(int resourceId, int privs)
 {
     return(DataCommand.Create()
            .Param("ResourceID", resourceId)
            .Param("Privs", privs)
            .FillDataTable("sselScheduler.dbo.procResourceEmailSelect"));
 }
Esempio n. 10
0
 public static DataSet GetClientAccountDataSet(int managerOrgId)
 {
     return(DataCommand.Create()
            .Param("Action", "ClientAccountByManager")
            .Param("ManagerOrgID", managerOrgId)
            .FillDataSet("dbo.ClientAccount_Select"));
 }
Esempio n. 11
0
 public static DataTable GetAccountsByOrgID(int orgId)
 {
     return(DataCommand.Create()
            .Param("Action", "AllByOrg")
            .Param("OrgID", orgId)
            .FillDataTable("dbo.Account_Select"));
 }
Esempio n. 12
0
 public static DataTable GetActiveManagers(int clientId)
 {
     return(DataCommand.Create()
            .Param("Action", "AllActiveManager")
            .Param("ClientID", clientId > 0, clientId)
            .FillDataTable("dbo.ClientOrg_Select"));
 }
Esempio n. 13
0
 public static DataView GetInternalAccounts()
 {
     return(DataCommand.Create()
            .Param("Action", "AllInternal")
            .FillDataTable("dbo.Account_Select")
            .DefaultView);
 }
 //Get all users' ClientID who had accessed to the lab in any specific month
 public static DataTable GetMonthlyClientID(DateTime period)
 {
     return(DataCommand.Create()
            .Param("Action", "GetAllUsersDuringSpecificMonth")
            .Param("Period", period)
            .FillDataTable("dbo.RoomData_Select"));
 }
Esempio n. 15
0
 public static bool CumulativeUserExists(DateTime period)
 {
     return(DataCommand.Create()
            .Param("@Action", "DataCheck")
            .Param("@eDate", period)
            .ExecuteScalar <bool>("dbo.CumUserForNNIN_Select").Value);
 }
Esempio n. 16
0
 public static DataSet GetCostTables(DateTime period)
 {
     return(DataCommand.Create()
            .Param("Action", "GetCostTables")
            .Param("Period", period)
            .FillDataSet("dbo.NNIN_Select"));
 }
Esempio n. 17
0
 public static int GetBillingTypeID(int clientOrgId)
 {
     return(DataCommand.Create()
            .Param("Action", "GetCurrentTypeID")
            .Param("ClientOrgID", clientOrgId)
            .ExecuteScalar <int>("ClientOrgBillingTypeTS_Select").Value);
 }
Esempio n. 18
0
 public static DataTable GetAllNAPRoomsWithCosts(DateTime period)
 {
     return(DataCommand.Create()
            .Param("Action", "NAPRoomsWithCost")
            .Param("Period", period)
            .FillDataTable("dbo.Room_Select"));
 }
Esempio n. 19
0
 public static int GetChargeType(int accountId)
 {
     return(DataCommand.Create()
            .Param("Action", "GetChargeType")
            .Param("AccountID", accountId)
            .ExecuteScalar <int>("dbo.Account_Select").Value);
 }
Esempio n. 20
0
 public static DataSet GetToolBillingTempDataByClientID20110701(DateTime period, int clientId)
 {
     return(DataCommand.Create()
            .Param("Period", period)
            .Param("ClientID", clientId)
            .FillDataSet("dbo.ToolBillingTemp20110701_Select"));
 }
Esempio n. 21
0
        public static DataTable GetAllBillingTypes()
        {
            var dt = DataCommand.Create().Param("Action", "All").FillDataTable("dbo.BillingType_Select");

            dt.PrimaryKey = new[] { dt.Columns["BillingTypeID"] };
            return(dt);
        }
Esempio n. 22
0
        // the new is needed to get the definitions of the auxilliary parameters
        public Compile()
        {
            InitArrays();

            var dtAuxCost = DataCommand.Create()
                            .Param("CostType", "All")
                            .FillDataTable("dbo.AuxCost_Select");

            string[] arySearch = { "'Room*'", "'Tool*'", "'Store*'", "'Store*'" };

            DataRow[] fdr = null;

            for (int j = 0; j <= 3; j++)
            {
                fdr = dtAuxCost.Select("AuxCostParm like " + arySearch[j]);
                for (int i = 0; i <= fdr.GetUpperBound(0); i++)
                {
                    if (Convert.ToBoolean(fdr[i]["AllowPerUse"]))
                    {
                        AddAuxParamToArray(j, fdr[i]["AuxCostParm"].ToString(), "Add", fdr[i]["Description"].ToString());
                    }
                    if (Convert.ToBoolean(fdr[i]["AllowPerPeriod"]))
                    {
                        AddAuxParamToArray(j, fdr[i]["AuxCostParm"].ToString(), "Mul", fdr[i]["Description"].ToString());
                    }
                }
            }
        }
Esempio n. 23
0
 public static DataSet GetToolBillingDataByClientID(DateTime period, int clientId)
 {
     return(DataCommand.Create()
            .Param("Action", "ByClientIDPeriod")
            .Param("Period", period)
            .Param("ClientID", clientId)
            .FillDataSet("dbo.ToolBilling_Select"));
 }
Esempio n. 24
0
 public static DataSet GetDataTablesForSUBReport(DateTime startPeriod, DateTime endPeriod)
 {
     return(DataCommand.Create()
            .Param("Action", "ForSUBReport")
            .Param("StartPeriod", startPeriod)
            .Param("EndPeriod", endPeriod)
            .FillDataSet("dbo.ToolBilling_Select"));
 }
 public static DataTable GetStoreBillingTempDataByClientID(DateTime period, int clientId)
 {
     return(DataCommand.Create()
            .Param("Action", "ByClientIDPeriod")
            .Param("Period", period)
            .Param("ClientID", clientId)
            .FillDataTable("dbo.StoreBillingTemp_Select"));
 }
Esempio n. 26
0
 public static DataSet GetDataTablesForSUBReportWithTwoCreditsAccount(DateTime startPeriod, DateTime endPeriod)
 {
     return(DataCommand.Create()
            .Param("Action", "ForSUBReportWithTwoCreditAccounts")
            .Param("StartPeriod", startPeriod)
            .Param("EndPeriod", endPeriod)
            .FillDataSet("dbo.StoreBilling_Select"));
 }
Esempio n. 27
0
 public static DataTable GetRoomBillingDataByClientID(DateTime period, int clientId)
 {
     return(DataCommand.Create()
            .Param("Action", "ByClientIDPeriod")
            .Param("Period", period)
            .Param("ClientID", clientId)
            .FillDataTable("dbo.RoomApportionmentInDaysMonthly_Select"));
 }
Esempio n. 28
0
        public static DataTable GetFutureToolStatus()
        {
            var dt = DataCommand.Create()
                     .Param("Action", "SelectFutureToolStatus")
                     .FillDataTable("sselScheduler.dbo.procReservationSelect");

            return(dt);
        }
Esempio n. 29
0
        public static ExecuteReaderResult GetAllToolsFromScheduler()
        {
            var reader = DataCommand.Create()
                         .Param("Action", "AllResources")
                         .ExecuteReader("dbo.sselScheduler_Select");

            return(reader);
        }
Esempio n. 30
0
 public static DataTable GetCumulativeUserAggregateData(DateTime sDate, DateTime eDate)
 {
     return(DataCommand.Create()
            .Param("Action", "Aggregate")
            .Param("sDate", sDate)
            .Param("eDate", eDate)
            .FillDataTable("dbo.CumUserForNNIN_Select"));
 }