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); }
public static void GetVolunteerData( int pkVolunteer , out string firstName , out string lastName , out string address , out string city , out string state , out string zip , out string homePhone , out string workPhone , out string workPhoneExt , out string cellPhone , out string email , out bool active , out string comments , out int fkOrganization , out int fkrefPositionType) { SQLStoredProc sp = new SQLStoredProc(config.ConnectionString, "haah.GetVolunteerData"); sp.AddInputParameter("@pkVolunteer", pkVolunteer); sp.AddOutputParameter("@fkOrganization", SqlDbType.Int); sp.AddOutputParameter("@fkrefPositionType", SqlDbType.Int); sp.AddOutputParameter("@LastName", SqlDbType.VarChar, 50); sp.AddOutputParameter("@FirstName", SqlDbType.VarChar, 50); sp.AddOutputParameter("@Address", SqlDbType.VarChar, 50); sp.AddOutputParameter("@City", SqlDbType.VarChar, 50); sp.AddOutputParameter("@State", SqlDbType.VarChar, 2); sp.AddOutputParameter("@Zip", SqlDbType.VarChar, 9); sp.AddOutputParameter("@Comments", SqlDbType.VarChar, 500); sp.AddOutputParameter("@HomePhone", SqlDbType.VarChar, 10); sp.AddOutputParameter("@WorkPhone", SqlDbType.VarChar, 10); sp.AddOutputParameter("@WorkPhoneExt", SqlDbType.VarChar, 5); sp.AddOutputParameter("@CellPhone", SqlDbType.VarChar, 10); sp.AddOutputParameter("@Email", SqlDbType.VarChar, 75); sp.AddOutputParameter("@CurrentlyActive", SqlDbType.Bit); sp.ExecNonQuery(); firstName = sp.OutputParameterValueString("@FirstName", ""); lastName = sp.OutputParameterValueString("@LastName", ""); address = sp.OutputParameterValueString("@Address", ""); city = sp.OutputParameterValueString("@City", ""); state = sp.OutputParameterValueString("@State", ""); zip = sp.OutputParameterValueString("@Zip", ""); homePhone = sp.OutputParameterValueString("@HomePhone", ""); workPhone = sp.OutputParameterValueString("@WorkPhone", ""); workPhoneExt = sp.OutputParameterValueString("@WorkPhoneExt", ""); cellPhone = sp.OutputParameterValueString("@CellPhone", ""); email = sp.OutputParameterValueString("@Email", ""); active = (sp.OutputParameterValueString("@CurrentlyActive", "") == "True"); comments = sp.OutputParameterValueString("@Comments", ""); fkOrganization = sp.OutputParameterValueInt("@fkOrganization", -1); fkrefPositionType = sp.OutputParameterValueInt("@fkrefPositionType", -1); }
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", ""); }