Example #1
0
        public static void GetWorkDayDetails(
            int pkWorkDay
            , out int fkBuildProject
            , out DateTime WorkDate
            , out string WorkDescription
            , out string Comments
            , out int LunchfkOrganization)
        {
            SQLStoredProc sp = new SQLStoredProc(config.ConnectionString, "haah.GetWorkDayDetails");
            sp.AddInputParameter("@pkWorkDay", pkWorkDay);
            sp.AddOutputParameter("@fkBuildProject", SqlDbType.Int);
            sp.AddOutputParameter("@WorkDate", SqlDbType.DateTime);
            sp.AddOutputParameter("@WorkDescription", SqlDbType.VarChar, 500);
            sp.AddOutputParameter("@Comments", SqlDbType.VarChar, 500);
            sp.AddOutputParameter("@LunchfkOrganization", SqlDbType.Int);

            sp.ExecNonQuery();
            fkBuildProject = sp.OutputParameterValueInt("@fkBuildProject", -1);
            WorkDate = sp.OutputParameterValueDateTime("@WorkDate", DateTime.MinValue);
            WorkDescription = sp.OutputParameterValueString("@WorkDescription", "");
            Comments = sp.OutputParameterValueString("@Comments", "");
            LunchfkOrganization = sp.OutputParameterValueInt("@LunchfkOrganization", -1);
        }
Example #2
0
        public static void GetVolunteerWorkDay(
            int pkVolunteer
            , int pkWorkDay
            , out DateTime ActualStartTime
            , out DateTime ActualEndTime
            , out DateTime ProjectedStartTime
            , out DateTime ProjectedEndTime
            , out string Comments
            , out bool NoShow
            , out DateTime BaseDate
            , out string VolunteerName
            , out string OrganizationName)
        {
            SQLStoredProc sp = new SQLStoredProc(config.ConnectionString, "haah.GetVolunteerWorkDay");
            sp.AddInputParameter("@pkVolunteer", pkVolunteer);
            sp.AddInputParameter("@pkWorkDay", pkWorkDay);
            sp.AddOutputParameter("@ActualStartTime", SqlDbType.DateTime);
            sp.AddOutputParameter("@ActualEndTime", SqlDbType.DateTime);
            sp.AddOutputParameter("@ProjectedStartTime", SqlDbType.DateTime);
            sp.AddOutputParameter("@ProjectedEndTime", SqlDbType.DateTime);
            sp.AddOutputParameter("@Comments", SqlDbType.VarChar, 500);
            sp.AddOutputParameter("@NoShow", SqlDbType.Bit);
            sp.AddOutputParameter("@BaseDate", SqlDbType.DateTime);
            sp.AddOutputParameter("@VolunteerName", SqlDbType.VarChar, 100);
            sp.AddOutputParameter("@OrganizationName", SqlDbType.VarChar, 100);

            sp.ExecNonQuery();

            ActualStartTime = sp.OutputParameterValueDateTime("@ActualStartTime", DateTime.MinValue);
            ActualEndTime = sp.OutputParameterValueDateTime("@ActualEndTime", DateTime.MinValue);
            ProjectedStartTime = sp.OutputParameterValueDateTime("@ProjectedStartTime", DateTime.MinValue);
            ProjectedEndTime = sp.OutputParameterValueDateTime("@ProjectedEndTime", DateTime.MinValue);
            Comments = sp.OutputParameterValueString("@Comments", "");
            NoShow = (sp.OutputParameterValueString("@NoShow", "") == "True");
            BaseDate = sp.OutputParameterValueDateTime("@BaseDate", DateTime.MinValue);
            VolunteerName = sp.OutputParameterValueString("@VolunteerName", "");
            OrganizationName = sp.OutputParameterValueString("@OrganizationName", "");
        }