public static bool InsertData(User x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add2Users" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@Password", User.ComputeHash(x.Password, "SHA512", null)) , new SqlParameter("@IsAdmin", x.IsAdmin) , new SqlParameter("@CanAdd", x.CanAdd) , new SqlParameter("@CanUpdate", x.CanUpdate) , new SqlParameter("@CanDelete", x.CanDelete) , new SqlParameter("@CanPresent", x.CanPresent) , new SqlParameter("@CanEnterTempFamily", x.CanEnterTempFamily) , new SqlParameter("@CanEnterFamily", x.CanEnterFamily) , new SqlParameter("@CanUpdateFamily", x.CanUpdateFamily) , new SqlParameter("@CanEnterFamilyNeed", x.CanEnterFamilyNeed) , new SqlParameter("@CanEnterListerGroup", x.CanEnterListerGroup) , new SqlParameter("@CanMakeStatistics", x.CanMakeStatistics) , new SqlParameter("@CanCancelTempFamily", x.CanCancelTempFamily) , new SqlParameter("@CanDeleteTempFamily", x.CanDeleteTempFamily) , new SqlParameter("@CanCancelFamily", x.CanCancelFamily) , new SqlParameter("@CanExport", x.CanExport) , new SqlParameter("@CanPrintReports", x.CanPrintReports) , new SqlParameter("@CanUpdateSupport", x.CanUpdateSupport) , new SqlParameter("@CanDeleteSupport", x.CanDeleteSupport) , new SqlParameter("@IT", x.IT) , new SqlParameter("@PointAdmin", x.PointAdmin) , new SqlParameter("@ReportCreator", x.ReportCreator) ); return(x.ID.HasValue); }
public bool InsertSupervisorData() { IdentityImage = BaseDataBase.CheckImageFile(IdentityImage); SupervisorID = BaseDataBase._StoredProcedureReturnable("sp_Add2Supervisor" , new SqlParameter("@SupervisorID", System.Data.SqlDbType.Int) , new SqlParameter("@FirstName", FirstName) , new SqlParameter("@LastName", LastName) , new SqlParameter("@BirthPlace", BirthPlace) , new SqlParameter("@DOB", DOB) , new SqlParameter("@Gender", Gender) , new SqlParameter("@Job", Job) , new SqlParameter("@Slary", Slary) , new SqlParameter("@Phone", Phone) , new SqlParameter("@Mobile", Mobile) , new SqlParameter("@Email", Email) , new SqlParameter("@MaritalStatus", MaritalStatus) , new SqlParameter("@ChildCount", ChildCount) , new SqlParameter("@IdentityImage", IdentityImage) , new SqlParameter("@PlaceAddress", PlaceAddress) , new SqlParameter("@ScientificQualifier", ScientificQualifier) , new SqlParameter("@Major", Major) , new SqlParameter("@IsActivated", IsActivated) , new SqlParameter("@NotActivatedReason", NotActivatedReason) , new SqlParameter("@Notes", Notes)); return(SupervisorID != null); }
public static bool InsertData(Item x) { x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_Item" , new SqlParameter("@Id", System.Data.SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@IsActive", x.IsActive) , new SqlParameter("@IsBasket", x.IsBasket) , new SqlParameter("@Source", x.Source) , new SqlParameter("@Barcode", x.Barcode) , new SqlParameter("@ItemType", x.ItemType) , new SqlParameter("@Description", x.Description) , new SqlParameter("@StandardUnit", x.StandardUnit) , new SqlParameter("@Unit2", x.Unit2) , new SqlParameter("@Unit2Convert", x.Unit2Convert) , new SqlParameter("@Unit3", x.Unit3) , new SqlParameter("@Unit3Convert", x.Unit3Convert) , new SqlParameter("@MinimumQuantity", x.MinimumQuantity) , new SqlParameter("@MaximumQuantity", x.MaximumQuantity) , new SqlParameter("@MaxQuantityPerOrder", x.MaxQuantityPerOrder) , new SqlParameter("@MaxQuantityPerFamily", x.MaxQuantityPerFamily) , new SqlParameter("@MaxQuantityPerDay", x.MaxQuantityPerDay) , new SqlParameter("@WarningQuantity", x.WarningQuantity) , new SqlParameter("@Weight", x.Weight) , new SqlParameter("@DefaultLocation", x.DefaultLocation) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID)); return(x.Id.HasValue); }
public static bool InsertData(Inventory x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_Inventory" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@IsActive", x.IsActive) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID)); return(x.ID.HasValue); }
public static bool InsertData(SpecialCardCenter x) { x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_SpecialCardCenter" , new SqlParameter("@Id", System.Data.SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@IsActive", x.IsActive) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID)); return(x.Id.HasValue); }
public static bool InsertData(FamilyNeed_ListerGroup x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add2FamilyNeed_ListerGroup" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@FamilyNeedListerID", x.FamilyNeedByLister.ID) , new SqlParameter("@ListerGroupID", x.ListerGroupID) , new SqlParameter("@OrderID", x.OrderID) , new SqlParameter("@Count", x.Count)); return(x.ID.HasValue); }
public bool InsertData() { ID = BaseDataBase._StoredProcedureReturnable("sp_Add2Orphan_Specialty" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@OrphanID", OrphanID) , new SqlParameter("@SpecialtyID", SpecialtyID) , new SqlParameter("@SpecialtyValue", SpecialtyValue) , new SqlParameter("@Date", Date) , new SqlParameter("@Notes", Notes)); return(ID != null); }
public static bool InsertData(TempChild tc) { tc.ChildID = BaseDataBase._StoredProcedureReturnable("sp_Add2TempChild" , new SqlParameter("@ChildID", System.Data.SqlDbType.Int) , new SqlParameter("@TempFamilyID", tc.TempFamilyID) , new SqlParameter("@Name", tc.Name) , new SqlParameter("@DOB", tc.DOB) , new SqlParameter("@Gender", tc.Gender)); return(tc.ChildID.HasValue); }
public bool InsertData() { ID = BaseDataBase._StoredProcedureReturnable("sp_Add2Orphan_Supervisor" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@SupervisorID", SupervisorID) , new SqlParameter("@OrphanID", OrphanID) , new SqlParameter("@Date", Date) , new SqlParameter("@EndDate", EndDate) , new SqlParameter("@SupervisorType", SupervisorType) , new SqlParameter("@Notes", Notes)); return(ID != null); }
public static bool InsertData(ItemCriteria x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_ItemCriteria" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@ItemID", x.CriteriaItem.Id.Value) , new SqlParameter("@StartCriteria", x.StartCriteria) , new SqlParameter("@EndCriteria", x.EndCriteria) , new SqlParameter("@CriteriaType", x.CriteriaType) , new SqlParameter("@Count", x.Count) , new SqlParameter("@Evaluation", x.Evaluation) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID)); return(x.ID.HasValue); }
public static bool InsertData(Sponsorship x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_Sponsorship" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@OrphanID", x.OrphanID) , new SqlParameter("@StartDate", x.StartDate) , new SqlParameter("@EndDate", x.EndDate) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID) , new SqlParameter("@IsDouble", x.IsDouble) , new SqlParameter("@AvailableSponsorshipID", x.AvailableSponsorship.ID)); return(x.ID.HasValue); }
public bool InsertOrphanHealthData() { ID = BaseDataBase._StoredProcedureReturnable("sp_Add2OrphanHealth" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@OrphanID", OrphanID) , new SqlParameter("@HealthSituation", HealthSituation) , new SqlParameter("@Date", Date) , new SqlParameter("@DayNeeded", DayNeeded) , new SqlParameter("@SpecialNeeded", SpecialNeeded) , new SqlParameter("@IsExist", IsExist) , new SqlParameter("@Notes", Notes)); return(ID != null); }
public static bool InsertData(TempFamily t) { t.Creator = BaseDataBase.CurrentUser.Name; t.ID = BaseDataBase._StoredProcedureReturnable("sp_Add2TempFamily" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@FamilyName", t.FamilyName) , new SqlParameter("@FamilyCode", t.FamilyCode) , new SqlParameter("@ApplyDate", t.ApplyDate) , new SqlParameter("@Notes", t.Notes) , new SqlParameter("@FamilyType", t.FamilyType) , new SqlParameter("@FamilyIdentityID", t.FamilyIdentityID) , new SqlParameter("@FatherFirstName", t.FatherFirstName) , new SqlParameter("@FatherFatherName", t.FatherFatherName) , new SqlParameter("@FatherLastName", t.FatherLastName) , new SqlParameter("@FatherBornPlace", t.FatherBornPlace) , new SqlParameter("@FatherPID", t.FatherPID) , new SqlParameter("@FatherDOB", t.FatherDOB) , new SqlParameter("@MotherFirstName", t.MotherFirstName) , new SqlParameter("@MotherFatherName", t.MotherFatherName) , new SqlParameter("@MotherLastName", t.MotherLastName) , new SqlParameter("@MotherBornPlace", t.MotherBornPlace) , new SqlParameter("@MotherPID", t.MotherPID) , new SqlParameter("@MotherDOB", t.MotherDOB) , new SqlParameter("@Phone", t.Phone) , new SqlParameter("@Mobile1", t.Mobile1) , new SqlParameter("@Mobile2", t.Mobile2) , new SqlParameter("@IsPrinted", t.IsPrinted) , new SqlParameter("@Printer", t.Printer) , new SqlParameter("@HouseSection", t.HouseSection) , new SqlParameter("@HouseStreet", t.HouseStreet) , new SqlParameter("@HouseBuildingNumber", t.HouseBuildingNumber) , new SqlParameter("@HouseFloor", t.HouseFloor) , new SqlParameter("@HouseAddress", t.HouseAddress) , new SqlParameter("@HouseOldAddress", t.HouseOldAddress) , new SqlParameter("@Creator", t.Creator) , new SqlParameter("@IsCancelled", t.IsCancelled) , new SqlParameter("@FamilyPersonCount", t.FamilyPersonCount) , new SqlParameter("@CancelReason", t.CancelReason) , new SqlParameter("@FamilyID", t.FamilyID) ); t.FamilyCode = BaseDataBase._Scalar("select FamilyCode from TempFamily where Id = " + t.ID); foreach (var tc in t.TempChilds) { tc.TempFamilyID = t.ID; TempChild.InsertData(tc); } return(t.ID.HasValue); }
public static bool InsertData(UserMessage x) { x.MessageID = BaseDataBase._StoredProcedureReturnable("sp_Add_UserMessage" , new SqlParameter("@MessageID", System.Data.SqlDbType.Int) , new SqlParameter("@SenderID", x.SenderID) , new SqlParameter("@RecieverID", x.RecieverID) , new SqlParameter("@Message", x.Message) , new SqlParameter("@Date", x.Date) , new SqlParameter("@IsReaded", x.IsReaded) , new SqlParameter("@ReadDate", x.ReadDate) , new SqlParameter("@IsReceived", x.IsReceived) , new SqlParameter("@ReceiveDate", x.ReceiveDate)); return(x.MessageID.HasValue); }
public static bool InsertData(Invoice x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_Invoice" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@CreateDate", x.CreateDate) , new SqlParameter("@Receiver", x.Receiver) , new SqlParameter("@ReceiverPID", x.ReceiverPID) , new SqlParameter("@TotalValue", x.TotalValue) , new SqlParameter("@Barcode", x.Barcode) , new SqlParameter("@Serial", x.Serial) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID) , new SqlParameter("@Description", x.Description)); return(x.ID.HasValue); }
public static bool InsertData(Trained x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_Trained" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@TrainingID", x.Training.ID) , new SqlParameter("@TrainedType", (int)x.TrainedType) , new SqlParameter("@TrainedID", x.TrainedID) , new SqlParameter("@IsAttended", x.IsAttended) , new SqlParameter("@IsAbiding", x.IsAbiding) , new SqlParameter("@Evaluation", x.Evaluation) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@AttendedExam", x.AttendedExam) , new SqlParameter("@TakeCertificate", x.TakeCertificate)); return(x.ID.HasValue); }
public static bool InsertData(Training x) { x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_Training" , new SqlParameter("@ID", SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@StartDate", x.StartDate) , new SqlParameter("@EndDate", x.EndDate) , new SqlParameter("@TrainingGoal", x.TrainingGoal) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@IsCancelled", x.IsCancelled) , new SqlParameter("@CancelReason", x.CancelReason) , new SqlParameter("@Trainer", x.Trainer) , new SqlParameter("@Type", (int)x.Type)); return(x.ID.HasValue); }
public static bool InsertData(SpecialCardSource x) { x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_SpecialCardSource" , new SqlParameter("@Id", System.Data.SqlDbType.Int) , new SqlParameter("@SpecialCardID", x.SpecialCardID) , new SqlParameter("@CenterID", x.CenterID) , new SqlParameter("@BeneficiaryType", x.BeneficiaryType) , new SqlParameter("@BeneficiaryID", x.BeneficiaryID) , new SqlParameter("@StartDate", x.StartDate) , new SqlParameter("@EndDate", x.EndDate) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@Code", x.Code) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID)); return(x.Id.HasValue); }
public static bool InsertData(SpecialFamily x) { x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_SpecialFamily", new SqlParameter("@Id", System.Data.SqlDbType.Int), new SqlParameter("@Name", x.Name), new SqlParameter("@PID", x.PID), new SqlParameter("@FatherName", x.FatherName), new SqlParameter("@MotherName", x.MotherName), new SqlParameter("@Gender", x.Gender), new SqlParameter("@DOB", x.DOB), new SqlParameter("@Notes", x.Notes), new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID)); return(x.Id.HasValue); }
public bool InsertExternalFamilyData() { ExternalFamilySupportID = BaseDataBase._StoredProcedureReturnable("sp_Add2ExternalFamilySupport" , new SqlParameter("@ExternalFamilySupportID", System.Data.SqlDbType.Int) , new SqlParameter("@FamilyID", FamilyID) , new SqlParameter("@SupportType", SupportType) , new SqlParameter("@SupportSourse", SupportSourse) , new SqlParameter("@Value", Value) , new SqlParameter("@Date", Date) , new SqlParameter("@Notes", Notes)); if (ExternalFamilySupportID == null) { return(false); } return(true); }
public static bool InsertData(Transition x) { x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_Transition" , new SqlParameter("@Id", System.Data.SqlDbType.Int) , new SqlParameter("@RightAccount", x.RightAccount.Id) , new SqlParameter("@LeftAccount", x.LeftAccount.Id) , new SqlParameter("@Value", x.Value) , new SqlParameter("@CreateDate", x.CreateDate) , new SqlParameter("@Details", x.Details) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID) , new SqlParameter("@IsHidden", x.IsHidden) , new SqlParameter("@AccountType", (int)x.AccountType) , new SqlParameter("@InvoiceID", x.InvoiceID) , new SqlParameter("@SponsorshipID", x.SponsorshipID)); return(x.Id.HasValue); }
public bool InsertData() { impedingIdentityImage = BaseDataBase.CheckImageFile(impedingidentityimage); ID = BaseDataBase._StoredProcedureReturnable("sp_Add2impeding" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@impedingType", impedingType) , new SqlParameter("@impedingDegree", impedingDegree) , new SqlParameter("@impedingIdentityID", impedingIdentityID) , new SqlParameter("@impedingIdentityImage", impedingIdentityImage) , new SqlParameter("@RelatedAssociation", RelatedAssociation) , new SqlParameter("@ImpedingDate", ImpedingDate) , new SqlParameter("@Notes", Notes) , new SqlParameter("@OrphanID", OrphanID)); return(ID != null); }
public bool InsertData() { ID = BaseDataBase._StoredProcedureReturnable("sp_Add2TeachingStage" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@OrphanID", OrphanID) , new SqlParameter("@StudyStage", StudyStage) , new SqlParameter("@School", School) , new SqlParameter("@Class", Class) , new SqlParameter("@Evaluation", Evaluation) , new SqlParameter("@EvaluationReason", EvaluationReason) , new SqlParameter("@Date", Date) , new SqlParameter("@IsStopped", IsStopped) , new SqlParameter("@StopReason", StopReason) , new SqlParameter("@Notes", Notes)); return(ID != null); }
public static bool InsertData(Account x) { x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_Account" , new SqlParameter("@Id", System.Data.SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@Type", (int)x.Type) , new SqlParameter("@CurrentBalance", x.CurrentBalance) , new SqlParameter("@CreateDate", x.CreateDate) , new SqlParameter("@OwnerID", x.OwnerID) , new SqlParameter("@Status", x.Status) , new SqlParameter("@LastUserID", x.LastUserID) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@IsDebit", x.IsDebit) , new SqlParameter("@Code", x.Code)); return(x.Id.HasValue); }
public bool InsertPersonQualificationData() { QualificationImage = BaseDataBase.CheckImageFile(QualificationImage); PersonQualificationID = BaseDataBase._StoredProcedureReturnable("sp_Add2PersonQualification" , new SqlParameter("@PersonQualificationID", System.Data.SqlDbType.Int) , new SqlParameter("@PersonType", PersonType) , new SqlParameter("@PersonID", PersonID) , new SqlParameter("@QualificationName", QualificationName) , new SqlParameter("@DateOfQualification", DateOfQualification) , new SqlParameter("@QualificationImage", QualificationImage) , new SqlParameter("@Notes", Notes)); if (PersonQualificationID == null) { return(false); } return(true); }
public static bool InsertData(Guardian x) { x.GuardianID = BaseDataBase._StoredProcedureReturnable("sp_Add_Guardian" , new SqlParameter("@GuardianID", SqlDbType.Int) , new SqlParameter("@FirstName", x.FirstName) , new SqlParameter("@LastName", x.LastName) , new SqlParameter("@FatherName", x.FatherName) , new SqlParameter("@Gender", x.Gender) , new SqlParameter("@DOB", x.DOB) , new SqlParameter("@Job", x.Job) , new SqlParameter("@Phone", x.Phone) , new SqlParameter("@Mobile", x.Mobile) , new SqlParameter("@Email", x.Email) , new SqlParameter("@MaritalStatus", x.MaritalStatus) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@Relationship", x.Relationship) , new SqlParameter("@PID", x.PID) , new SqlParameter("@FamilyID", x.FamilyID)); return(x.GuardianID.HasValue); }
public static bool InsertData(Sponsor x) { x.SponsorID = BaseDataBase._StoredProcedureReturnable("sp_Add_Sponsor" , new SqlParameter("@SponsorID", SqlDbType.Int) , new SqlParameter("@Name", x.Name) , new SqlParameter("@Nationality", x.Nationality) , new SqlParameter("@IsOrganazation", x.IsOrganazation) , new SqlParameter("@DOB", x.DOB) , new SqlParameter("@Gender", x.Gender) , new SqlParameter("@Phone", x.Phone) , new SqlParameter("@Mobile", x.Mobile) , new SqlParameter("@Email", x.Email) , new SqlParameter("@Address", x.Address) , new SqlParameter("@MainSponsorship", x.MainSponsorship) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@MediatorName", x.MediatorName) , new SqlParameter("@MediatorMobile", x.MediatorMobile) , new SqlParameter("@Status", x.Status)); return(x.SponsorID.HasValue); }
public static bool InsertData(Order x, bool InsertOrderItems = false) { x.LastUserID = BaseDataBase.CurrentUser.ID.Value; x.Id = BaseDataBase._StoredProcedureReturnable("sp_Add_Order" , new SqlParameter("@Id", System.Data.SqlDbType.Int) , new SqlParameter("@InventoryID", x.InventoryID) , new SqlParameter("@FamilyID", x.FamilyID) , new SqlParameter("@OrphanID", x.OrphanID) , new SqlParameter("@SpecialFamilyID", x.SpecialFamilyID) , new SqlParameter("@Type", x.Type) , new SqlParameter("@Date", x.Date) , new SqlParameter("@NextOrderDate", x.NextOrderDate) , new SqlParameter("@Description", x.Description) , new SqlParameter("@Source", x.Source) , new SqlParameter("@InvoiceSerial", x.InvoiceSerial) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@LastUserID", x.LastUserID)); if (InsertOrderItems) { foreach (var item in x.OIs) { item.Order = x; Order_Item.InsertData(item); } } x.OrderCode = int.Parse(BaseDataBase._Scalar($"select OrderCode from [Order] where Id = {x.Id}")); x.BarCode = BaseDataBase._Scalar($"select BarCode from [Order] where Id = {x.Id}"); //if (x.Id.HasValue) //{ // foreach (var item in x.FamilyNeeds) // { // if (item.IsEnsured) // item.OrderID = x.Id; // else item.OrderID = null; // FamilyNeed_ListerGroup.UpdateData(item); // } //} return(x.Id.HasValue); }
public static bool InsertData(AvailableSponsorship x) { if (x.SponsorshipType == "") { x.Duration = null; } x.ID = BaseDataBase._StoredProcedureReturnable("sp_Add_AvailableSponsorship" , new SqlParameter("@ID", System.Data.SqlDbType.Int) , new SqlParameter("@SponsorID", x.RelatedSponsor.SponsorID) , new SqlParameter("@NOB", x.NOB) , new SqlParameter("@Duration", x.Duration) , new SqlParameter("@SponsorshipValue", x.SponsorshipValue) , new SqlParameter("@SponsorshipType", x.SponsorshipType) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@LastUserID", BaseDataBase.CurrentUser.ID) , new SqlParameter("@IsCompensated", x.IsCompensated) , new SqlParameter("@OverMonths", x.OverMonths) , new SqlParameter("@SponsorType", x.SponsorType) , new SqlParameter("@CreateDate", x.CreateDate)); return(x.ID.HasValue); }
public static bool InsertData(Orphan x) { x.OrphanID = BaseDataBase._StoredProcedureReturnable("sp_Add_Orphan" , new SqlParameter("@OrphanID", System.Data.SqlDbType.Int) , new SqlParameter("@FamilyID", x.OrphanFamily.FamilyID) , new SqlParameter("@FirstName", x.FirstName) , new SqlParameter("@LastName", x.LastName) , new SqlParameter("@Gender", x.Gender) , new SqlParameter("@BirthPlace", x.BirthPlace) , new SqlParameter("@DOB", x.DOB) , new SqlParameter("@Nationality", x.Nationality) , new SqlParameter("@PID", x.PID) , new SqlParameter("@Mobile", x.Mobile) , new SqlParameter("@Email", x.Email) , new SqlParameter("@Notes", x.Notes) , new SqlParameter("@Image", x.Image) , new SqlParameter("@Tall", x.Tall) , new SqlParameter("@Weight", x.Weight) , new SqlParameter("@FeetSize", x.FeetSize) , new SqlParameter("@WaistSize", x.WaistSize) , new SqlParameter("@Status", x.Status) , new SqlParameter("@Type", x.Type)); return(x.OrphanID.HasValue); }