public int Insert(InventoryTransferItem inventoryTransferItem) { InsertCommand.Parameters["@InventoryTransferNo"].Value = inventoryTransferItem.InventoryTransferNo; InsertCommand.Parameters["@FromInventoryLocationID"].Value = inventoryTransferItem.FromInventoryLocationID; InsertCommand.Parameters["@FromInventoryLocationName"].Value = inventoryTransferItem.FromInventoryLocationName; InsertCommand.Parameters["@ToInventoryLocationID"].Value = inventoryTransferItem.ToInventoryLocationID; InsertCommand.Parameters["@ToInventoryLocationName"].Value = inventoryTransferItem.ToInventoryLocationName; InsertCommand.Parameters["@Total"].Value = inventoryTransferItem.Total; InsertCommand.Parameters["@Discount"].Value = inventoryTransferItem.Discount; InsertCommand.Parameters["@NetTotal"].Value = inventoryTransferItem.NetTotal; InsertCommand.Parameters["@InventoryTransferDate"].Value = inventoryTransferItem.InventoryTransferDate; InsertCommand.Parameters["@Username"].Value = inventoryTransferItem.Username; InsertCommand.Parameters["@Status"].Value = inventoryTransferItem.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(InventoryTransfer inventoryTransfer) { InsertCommand.Parameters["@InventoryTransferNo"].Value = inventoryTransfer.InventoryTransferNo; InsertCommand.Parameters["@ItemCategoryID"].Value = inventoryTransfer.ItemCategoryID; InsertCommand.Parameters["@ItemTypeID"].Value = inventoryTransfer.ItemTypeID; InsertCommand.Parameters["@Description"].Value = inventoryTransfer.Description; InsertCommand.Parameters["@UnitCost"].Value = inventoryTransfer.UnitCost; InsertCommand.Parameters["@Qty"].Value = inventoryTransfer.Qty; InsertCommand.Parameters["@UnitType"].Value = inventoryTransfer.UnitType; InsertCommand.Parameters["@AmountCost"].Value = inventoryTransfer.AmountCost; InsertCommand.Parameters["@Status"].Value = inventoryTransfer.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(Ultrasound ultrasound) { InsertCommand.Parameters["@ItemName"].Value = ultrasound.ItemName; InsertCommand.Parameters["@ServiceFee"].Value = ultrasound.ServiceFee; InsertCommand.Parameters["@ReferFee"].Value = ultrasound.ReferFee; InsertCommand.Parameters["@ReaderFee"].Value = ultrasound.ReaderFee; InsertCommand.Parameters["@TechFee"].Value = ultrasound.TechFee; InsertCommand.Parameters["@Total"].Value = ultrasound.Total; InsertCommand.Parameters["@CreateDate"].Value = ultrasound.CreateDate; InsertCommand.Parameters["@Status"].Value = ultrasound.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(SubXRayReport subXRayReport) { InsertCommand.Parameters["@PatientID"].Value = subXRayReport.PatientID; InsertCommand.Parameters["@PatientName"].Value = subXRayReport.PatientName; InsertCommand.Parameters["@DOB"].Value = subXRayReport.DOB; InsertCommand.Parameters["@Sex"].Value = subXRayReport.Sex; InsertCommand.Parameters["@ImagePath"].Value = subXRayReport.ImagePath; InsertCommand.Parameters["@SubXRayReportDate"].Value = subXRayReport.SubXRayReportDate; InsertCommand.Parameters["@Report"].Value = subXRayReport.Report; InsertCommand.Parameters["@ConsultantRadiologist"].Value = subXRayReport.ConsultantRadiologist; InsertCommand.Parameters["@Status"].Value = subXRayReport.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(UserProfile userProfile) { InsertCommand.Parameters["@Name"].Value = userProfile.Name; InsertCommand.Parameters["@Username"].Value = userProfile.Username; InsertCommand.Parameters["@Password"].Value = userProfile.Password; InsertCommand.Parameters["@UserRoleID"].Value = userProfile.UserRoleID; InsertCommand.Parameters["@DepartmentID"].Value = userProfile.DepartmentID; InsertCommand.Parameters["@Status"].Value = userProfile.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(Project project) { InsertCommand.Parameters["@ProjectName"].Value = project.ProjectName; InsertCommand.Parameters["@CustomerID"].Value = project.CustomerID; InsertCommand.Parameters["@CustomerName"].Value = project.CustomerName; InsertCommand.Parameters["@ProjectCategoryID"].Value = project.ProjectCategoryID; InsertCommand.Parameters["@ProjectCategoryName"].Value = project.ProjectCategoryName; InsertCommand.Parameters["@ProjectStatusID"].Value = project.ProjectStatusID; InsertCommand.Parameters["@ProjectStatus"].Value = project.ProjectStatus; InsertCommand.Parameters["@CreatedDate"].Value = project.CreatedDate; InsertCommand.Parameters["@Status"].Value = project.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(SaleQuotation saleQuotation) { InsertCommand.Parameters["@ReferenceNo"].Value = saleQuotation.ReferenceNo; InsertCommand.Parameters["@InventoryItemID"].Value = saleQuotation.InventoryItemID; InsertCommand.Parameters["@ItemName"].Value = saleQuotation.ItemName; InsertCommand.Parameters["@Description"].Value = saleQuotation.Description; InsertCommand.Parameters["@Price"].Value = saleQuotation.Price; InsertCommand.Parameters["@Qty"].Value = saleQuotation.Qty; InsertCommand.Parameters["@Amount"].Value = saleQuotation.Amount; InsertCommand.Parameters["@Status"].Value = saleQuotation.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(ProjectSaleQuotation projectSaleQuotation) { InsertCommand.Parameters["@ReferenceNo"].Value = projectSaleQuotation.ReferenceNo; InsertCommand.Parameters["@ProjectID"].Value = projectSaleQuotation.ProjectID; InsertCommand.Parameters["@ProjectName"].Value = projectSaleQuotation.ProjectName; InsertCommand.Parameters["@CustomerName"].Value = projectSaleQuotation.CustomerName; InsertCommand.Parameters["@Total"].Value = projectSaleQuotation.Total; InsertCommand.Parameters["@Discount"].Value = projectSaleQuotation.Discount; InsertCommand.Parameters["@NetTotal"].Value = projectSaleQuotation.NetTotal; InsertCommand.Parameters["@CreatedDate"].Value = projectSaleQuotation.CreatedDate; InsertCommand.Parameters["@Username"].Value = projectSaleQuotation.Username; InsertCommand.Parameters["@Status"].Value = projectSaleQuotation.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(Supplier supplier) { InsertCommand.Parameters["@SupplierName"].Value = supplier.SupplierName; InsertCommand.Parameters["@Phone"].Value = supplier.Phone; InsertCommand.Parameters["@Address"].Value = supplier.Address; InsertCommand.Parameters["@Status"].Value = supplier.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(PurchaseInvoice purchaseInvoice) { InsertCommand.Parameters["@PurchaseInvoiceNo"].Value = purchaseInvoice.PurchaseInvoiceNo; InsertCommand.Parameters["@ItemCategoryID"].Value = purchaseInvoice.ItemCategoryID; InsertCommand.Parameters["@ItemTypeID"].Value = purchaseInvoice.ItemTypeID; InsertCommand.Parameters["@Description"].Value = purchaseInvoice.Description; InsertCommand.Parameters["@UnitCost"].Value = purchaseInvoice.UnitCost; InsertCommand.Parameters["@Qty"].Value = purchaseInvoice.Qty; InsertCommand.Parameters["@UnitType"].Value = purchaseInvoice.UnitType; InsertCommand.Parameters["@AmountCost"].Value = purchaseInvoice.AmountCost; InsertCommand.Parameters["@InventoryLocationID"].Value = purchaseInvoice.InventoryLocationID; InsertCommand.Parameters["@InventoryLocationName"].Value = purchaseInvoice.InventoryLocationName; InsertCommand.Parameters["@Status"].Value = purchaseInvoice.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(PurchaseInvoiceItem purchaseInvoiceItem) { InsertCommand.Parameters["@PurchaseInvoiceNo"].Value = purchaseInvoiceItem.PurchaseInvoiceNo; InsertCommand.Parameters["@ReferenceNo"].Value = purchaseInvoiceItem.ReferenceNo; InsertCommand.Parameters["@SupplierID"].Value = purchaseInvoiceItem.SupplierID; InsertCommand.Parameters["@SupplierName"].Value = purchaseInvoiceItem.SupplierName; InsertCommand.Parameters["@PaymentModeID"].Value = purchaseInvoiceItem.PaymentModeID; InsertCommand.Parameters["@PaymentMode"].Value = purchaseInvoiceItem.PaymentMode; InsertCommand.Parameters["@Total"].Value = purchaseInvoiceItem.Total; InsertCommand.Parameters["@Discount"].Value = purchaseInvoiceItem.Discount; InsertCommand.Parameters["@NetTotal"].Value = purchaseInvoiceItem.NetTotal; InsertCommand.Parameters["@PurchaseInvoiceDate"].Value = purchaseInvoiceItem.PurchaseInvoiceDate; InsertCommand.Parameters["@InventoryLocationID"].Value = purchaseInvoiceItem.InventoryLocationID; InsertCommand.Parameters["@InventoryLocationName"].Value = purchaseInvoiceItem.InventoryLocationName; InsertCommand.Parameters["@Username"].Value = purchaseInvoiceItem.Username; InsertCommand.Parameters["@Status"].Value = purchaseInvoiceItem.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(UltrasoundInvoice ultrasoundInvoice) { InsertCommand.Parameters["@InvoiceNo"].Value = ultrasoundInvoice.InvoiceNo; InsertCommand.Parameters["@ItemTypeID"].Value = ultrasoundInvoice.ItemTypeID; InsertCommand.Parameters["@Description"].Value = ultrasoundInvoice.Description; InsertCommand.Parameters["@UnitCost"].Value = ultrasoundInvoice.UnitCost; InsertCommand.Parameters["@Qty"].Value = ultrasoundInvoice.Qty; InsertCommand.Parameters["@AmountCost"].Value = ultrasoundInvoice.AmountCost; InsertCommand.Parameters["@Status"].Value = ultrasoundInvoice.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
/// <summary> /// 将对象添加到数据库 /// </summary> /// <param name="t">待添加的对象</param> /// <returns>是否成功添加</returns> public virtual bool Insert(T t) { if (t == null) { throw new ArgumentNullException("t"); } foreach (IDataParameter param in InsertCommand.Parameters) { ColumnDefinition column = TableDefinition.GetColumn(ToNativeName(param.ParameterName)); param.Value = ConvertToDBValue(column.GetValue(t), column); } if (IdentityColumn == null) { InsertCommand.ExecuteNonQuery(); } else { IDataParameter param = InsertCommand.Parameters.Contains(ToParamName(IdentityColumn.PropertyName)) ? (IDataParameter)InsertCommand.Parameters[ToParamName(IdentityColumn.PropertyName)] : null; if (param != null && param.Direction == ParameterDirection.Output) { InsertCommand.ExecuteNonQuery(); IdentityColumn.SetValue(t, ConvertValue(param.Value, IdentityColumn.PropertyType)); } else { IdentityColumn.SetValue(t, ConvertValue(InsertCommand.ExecuteScalar(), IdentityColumn.PropertyType)); } } return(true); }
public int Insert(Company company) { InsertCommand.Parameters["@CompanyName"].Value = company.CompanyName; InsertCommand.Parameters["@Address"].Value = company.Address; InsertCommand.Parameters["@ContactNo"].Value = company.ContactNo; InsertCommand.Parameters["@PaymentModeID"].Value = company.PaymentModeID; InsertCommand.Parameters["@PaymentMode"].Value = company.PaymentMode; InsertCommand.Parameters["@Status"].Value = company.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(WaterLevelDam waterLeveldam) { InsertCommand.Parameters["@DamID"].Value = waterLeveldam.DamID; InsertCommand.Parameters["@DamName"].Value = waterLeveldam.DamName; InsertCommand.Parameters["@LevelFeet"].Value = waterLeveldam.LevelFeet; InsertCommand.Parameters["@Remark"].Value = waterLeveldam.Remark; InsertCommand.Parameters["@CreatedDate"].Value = waterLeveldam.CreatedDate; InsertCommand.Parameters["@CreatedTime"].Value = waterLeveldam.CreatedTime; InsertCommand.Parameters["@Status"].Value = waterLeveldam.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(River river) { InsertCommand.Parameters["@RiverID"].Value = river.RiverID; InsertCommand.Parameters["@RiverName"].Value = river.RiverName; InsertCommand.Parameters["@Latitude"].Value = river.Latitude; InsertCommand.Parameters["@Longitude"].Value = river.Longitude; InsertCommand.Parameters["@Description"].Value = river.Description; InsertCommand.Parameters["@Status"].Value = river.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(COAAccount cOAAccount) { InsertCommand.Parameters["@AccountCategoryName"].Value = cOAAccount.AccountCategoryName; InsertCommand.Parameters["@AccountCategoryID"].Value = cOAAccount.AccountCategoryID; InsertCommand.Parameters["@AccountName"].Value = cOAAccount.AccountName; InsertCommand.Parameters["@ParentGroupID"].Value = cOAAccount.ParentGroupID; InsertCommand.Parameters["@ParentGroupName"].Value = cOAAccount.ParentGroupName; InsertCommand.Parameters["@Status"].Value = cOAAccount.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(Township township) { InsertCommand.Parameters["@TownshipName"].Value = township.TownshipName; InsertCommand.Parameters["@RegionID"].Value = township.RegionID; InsertCommand.Parameters["@RegionName"].Value = township.RegionName; InsertCommand.Parameters["@Status"].Value = township.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(MedicalCheckup medicalCheckup) { InsertCommand.Parameters["@ItemName"].Value = medicalCheckup.ItemName; InsertCommand.Parameters["@CompanyID"].Value = medicalCheckup.CompanyID; InsertCommand.Parameters["@MMK"].Value = medicalCheckup.MMK; InsertCommand.Parameters["@USD"].Value = medicalCheckup.USD; InsertCommand.Parameters["@CheckList"].Value = medicalCheckup.CheckList; InsertCommand.Parameters["@Status"].Value = medicalCheckup.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(LabTest labTest) { InsertCommand.Parameters["@ItemName"].Value = labTest.ItemName; InsertCommand.Parameters["@MMK"].Value = labTest.MMK; InsertCommand.Parameters["@USD"].Value = labTest.USD; InsertCommand.Parameters["@Status"].Value = labTest.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(UltrasoundReport ultrasoundReport) { InsertCommand.Parameters["@PatientID"].Value = ultrasoundReport.PatientID; InsertCommand.Parameters["@PatientName"].Value = ultrasoundReport.PatientName; InsertCommand.Parameters["@DOB"].Value = ultrasoundReport.DOB; InsertCommand.Parameters["@Sex"].Value = ultrasoundReport.Sex; InsertCommand.Parameters["@ImagePath"].Value = ultrasoundReport.ImagePath; InsertCommand.Parameters["@LiverSize"].Value = ultrasoundReport.LiverSize; InsertCommand.Parameters["@LiverMargin"].Value = ultrasoundReport.LiverMargin; InsertCommand.Parameters["@LiverSOL"].Value = ultrasoundReport.LiverSOL; InsertCommand.Parameters["@LiverEchogenicity"].Value = ultrasoundReport.LiverEchogenicity; InsertCommand.Parameters["@LiverCaudatelobe"].Value = ultrasoundReport.LiverCaudatelobe; InsertCommand.Parameters["@GallBLadderWallThickness"].Value = ultrasoundReport.GallBLadderWallThickness; InsertCommand.Parameters["@GallBLadderContent"].Value = ultrasoundReport.GallBLadderContent; InsertCommand.Parameters["@HepaticDucts"].Value = ultrasoundReport.HepaticDucts; InsertCommand.Parameters["@CBD"].Value = ultrasoundReport.CBD; InsertCommand.Parameters["@Pancreas"].Value = ultrasoundReport.Pancreas; InsertCommand.Parameters["@Spleen"].Value = ultrasoundReport.Spleen; InsertCommand.Parameters["@RightKidney"].Value = ultrasoundReport.RightKidney; InsertCommand.Parameters["@LeftKidney"].Value = ultrasoundReport.LeftKidney; InsertCommand.Parameters["@Bladder"].Value = ultrasoundReport.Bladder; InsertCommand.Parameters["@Uterus"].Value = ultrasoundReport.Uterus; InsertCommand.Parameters["@Ovary"].Value = ultrasoundReport.Ovary; InsertCommand.Parameters["@Others"].Value = ultrasoundReport.Others; InsertCommand.Parameters["@Impression"].Value = ultrasoundReport.Impression; InsertCommand.Parameters["@UltrasoundReportDate"].Value = ultrasoundReport.UltrasoundReportDate; InsertCommand.Parameters["@ConsultantRadiologist"].Value = ultrasoundReport.ConsultantRadiologist; InsertCommand.Parameters["@Status"].Value = ultrasoundReport.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(InventoryItem inventoryItem) { InsertCommand.Parameters["@ItemCode"].Value = inventoryItem.ItemCode; InsertCommand.Parameters["@ItemName"].Value = inventoryItem.ItemName; InsertCommand.Parameters["@UnitID"].Value = inventoryItem.UnitID; InsertCommand.Parameters["@UnitName"].Value = inventoryItem.UnitName; InsertCommand.Parameters["@PurchasePrice"].Value = inventoryItem.PurchasePrice; InsertCommand.Parameters["@SalePrice"].Value = inventoryItem.SalePrice; InsertCommand.Parameters["@Description"].Value = inventoryItem.Description; InsertCommand.Parameters["@CustomIncomeAccountID"].Value = inventoryItem.CustomIncomeAccountID; InsertCommand.Parameters["@CustomIncomeAccountName"].Value = inventoryItem.CustomIncomeAccountName; InsertCommand.Parameters["@CustomExpenseAccountID"].Value = inventoryItem.CustomExpenseAccountID; InsertCommand.Parameters["@CustomExpenseAccountName"].Value = inventoryItem.CustomExpenseAccountName; InsertCommand.Parameters["@QtyToReceive"].Value = inventoryItem.QtyToReceive; InsertCommand.Parameters["@QtyOnHand"].Value = inventoryItem.QtyOnHand; InsertCommand.Parameters["@QtyToDeliver"].Value = inventoryItem.QtyToDeliver; InsertCommand.Parameters["@QtyOwned"].Value = inventoryItem.QtyOwned; InsertCommand.Parameters["@AverageCost"].Value = inventoryItem.AverageCost; InsertCommand.Parameters["@TotalCost"].Value = inventoryItem.TotalCost; InsertCommand.Parameters["@CreatedDate"].Value = inventoryItem.CreatedDate; InsertCommand.Parameters["@Status"].Value = inventoryItem.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(XRayReport xRayReport) { InsertCommand.Parameters["@PatientID"].Value = xRayReport.PatientID; InsertCommand.Parameters["@PatientName"].Value = xRayReport.PatientName; InsertCommand.Parameters["@DOB"].Value = xRayReport.DOB; InsertCommand.Parameters["@Sex"].Value = xRayReport.Sex; InsertCommand.Parameters["@ImagePath"].Value = xRayReport.ImagePath; InsertCommand.Parameters["@XRayReportDate"].Value = xRayReport.XRayReportDate; InsertCommand.Parameters["@SkeletonAndSoftTissue"].Value = xRayReport.SkeletonAndSoftTissue; InsertCommand.Parameters["@CardiacShadow"].Value = xRayReport.CardiacShadow; InsertCommand.Parameters["@HilarandLymphaticGlands"].Value = xRayReport.HilarandLymphaticGlands; InsertCommand.Parameters["@HemidiaphragmsAndCostophrenicAngles"].Value = xRayReport.HemidiaphragmsAndCostophrenicAngles; InsertCommand.Parameters["@LungFields"].Value = xRayReport.LungFields; InsertCommand.Parameters["@EvidenceofTB"].Value = xRayReport.EvidenceofTB; InsertCommand.Parameters["@Evidenceofold"].Value = xRayReport.Evidenceofold; InsertCommand.Parameters["@EvidenceSuspicious"].Value = xRayReport.EvidenceSuspicious; InsertCommand.Parameters["@ConsultantRadiologist"].Value = xRayReport.ConsultantRadiologist; InsertCommand.Parameters["@Remark"].Value = xRayReport.Remark; InsertCommand.Parameters["@Status"].Value = xRayReport.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(InventoryLocation inventoryLocation) { InsertCommand.Parameters["@InventoryLocationName"].Value = inventoryLocation.InventoryLocationName; InsertCommand.Parameters["@Status"].Value = inventoryLocation.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(ProjectCategory projectCategory) { InsertCommand.Parameters["@ProjectCategoryName"].Value = projectCategory.ProjectCategoryName; InsertCommand.Parameters["@Status"].Value = projectCategory.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(Speciality speciality) { InsertCommand.Parameters["@SpecialityName"].Value = speciality.SpecialityName; InsertCommand.Parameters["@Status"].Value = speciality.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(UserRole userRole) { InsertCommand.Parameters["@RoleName"].Value = userRole.RoleName; InsertCommand.Parameters["@Status"].Value = userRole.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(Department department) { InsertCommand.Parameters["@DepartmentName"].Value = department.DepartmentName; InsertCommand.Parameters["@Status"].Value = department.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(RelationFormula relationFormula) { InsertCommand.Parameters["@RelationFormulaName"].Value = relationFormula.RelationFormulaName; InsertCommand.Parameters["@Status"].Value = relationFormula.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Insert(PatientInvoice patientInvoice) { InsertCommand.Parameters["@InvoiceNo"].Value = patientInvoice.InvoiceNo; InsertCommand.Parameters["@PatientID"].Value = patientInvoice.PatientID; InsertCommand.Parameters["@PatientName"].Value = patientInvoice.PatientName; InsertCommand.Parameters["@DoctorID"].Value = patientInvoice.DoctorID; InsertCommand.Parameters["@DoctorName"].Value = patientInvoice.DoctorName; InsertCommand.Parameters["@CompanyID"].Value = patientInvoice.CompanyID; InsertCommand.Parameters["@CompanyName"].Value = patientInvoice.CompanyName; InsertCommand.Parameters["@PaymentModeID"].Value = patientInvoice.PaymentModeID; InsertCommand.Parameters["@PaymentMode"].Value = patientInvoice.PaymentMode; InsertCommand.Parameters["@Total"].Value = patientInvoice.Total; InsertCommand.Parameters["@Discount"].Value = patientInvoice.Discount; InsertCommand.Parameters["@MOH"].Value = patientInvoice.MOH; InsertCommand.Parameters["@NetTotal"].Value = patientInvoice.NetTotal; InsertCommand.Parameters["@InvoiceDate"].Value = patientInvoice.InvoiceDate; InsertCommand.Parameters["@Username"].Value = patientInvoice.Username; InsertCommand.Parameters["@Status"].Value = patientInvoice.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }