Ejemplo n.º 1
0
        public int InsertCompany(EntityCompany entCompany)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@CompanyCode", DbType.String, entCompany.CompanyCode);
                Commons.ADDParameter(ref lstParam, "@CompanyName", DbType.String, entCompany.CompanyName);
                Commons.ADDParameter(ref lstParam, "@Address", DbType.String, entCompany.Address);
                Commons.ADDParameter(ref lstParam, "@PhoneNo", DbType.String, entCompany.PhoneNo);
                Commons.ADDParameter(ref lstParam, "@MobileNo", DbType.String, entCompany.MobileNo);
                Commons.ADDParameter(ref lstParam, "@VATCSTNo", DbType.String, entCompany.VATCSTNo);
                Commons.ADDParameter(ref lstParam, "@ExciseNo", DbType.String, entCompany.ExciseNo);
                Commons.ADDParameter(ref lstParam, "@Email", DbType.String, entCompany.Email);
                Commons.ADDParameter(ref lstParam, "@ServiceTaxNo", DbType.String, entCompany.ServiceTaxNo);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entCompany.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertCompany ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("CompanyBLL - InsertCompany(EntityCompany entCompany)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 2
0
        public int UpdateEmployee(EntityEmployee entEmployee)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@EmpCode", DbType.String, entEmployee.EmpCode);
                Commons.ADDParameter(ref lstParam, "@EmpFirstName", DbType.String, entEmployee.EmpFirstName);
                Commons.ADDParameter(ref lstParam, "@EmpMiddleName", DbType.String, entEmployee.EmpMiddleName);
                Commons.ADDParameter(ref lstParam, "@EmpLastName", DbType.String, entEmployee.EmpLastName);
                Commons.ADDParameter(ref lstParam, "@EmpAddress", DbType.String, entEmployee.EmpAddress);
                Commons.ADDParameter(ref lstParam, "@EmpDOB", DbType.DateTime, entEmployee.EmpDOB);
                Commons.ADDParameter(ref lstParam, "@EmpDOJ", DbType.DateTime, entEmployee.EmpDOJ);
                Commons.ADDParameter(ref lstParam, "@DeptId", DbType.String, entEmployee.DeptId);
                Commons.ADDParameter(ref lstParam, "@ChangeBy", DbType.String, entEmployee.ChangeBy);
                Commons.ADDParameter(ref lstParam, "@DesigId", DbType.Int32, entEmployee.DesignationId);
                Commons.ADDParameter(ref lstParam, "@BankName", DbType.String, entEmployee.BankName);
                Commons.ADDParameter(ref lstParam, "@BankACNo", DbType.String, entEmployee.BankACNo);
                Commons.ADDParameter(ref lstParam, "@PFNo", DbType.String, entEmployee.PFNo);
                Commons.ADDParameter(ref lstParam, "@PanNo", DbType.String, entEmployee.PanNo);
                Commons.ADDParameter(ref lstParam, "@BasicSalary", DbType.Decimal, entEmployee.BasicSal);
                cnt = mobjDataAcces.ExecuteQuery("sp_UpdateEmployee", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("EmployeeBLL - CreateParameterUpdateEmp(EntityEmployee entEmployee)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 3
0
        public int InsertInsurance(EntityInsuranceCom entInsurance)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@InsuranceCode", DbType.String, entInsurance.InsuranceCode);
                Commons.ADDParameter(ref lstParam, "@InsuranceDesc", DbType.String, entInsurance.InsuranceDesc);
                Commons.ADDParameter(ref lstParam, "@Address", DbType.String, entInsurance.Address);
                Commons.ADDParameter(ref lstParam, "@Country", DbType.String, entInsurance.Country);
                Commons.ADDParameter(ref lstParam, "@State", DbType.String, entInsurance.State);
                Commons.ADDParameter(ref lstParam, "@City", DbType.String, entInsurance.City);
                Commons.ADDParameter(ref lstParam, "@EmailID", DbType.String, entInsurance.EmailID);
                Commons.ADDParameter(ref lstParam, "@ContactNo", DbType.String, entInsurance.ContactNo);
                Commons.ADDParameter(ref lstParam, "@PostalCode", DbType.String, entInsurance.PostalCode);
                Commons.ADDParameter(ref lstParam, "@FaxNumber", DbType.String, entInsurance.FaxNumber);
                Commons.ADDParameter(ref lstParam, "@ContactPerson", DbType.String, entInsurance.ContactPerson);
                Commons.ADDParameter(ref lstParam, "@ContactPhNo", DbType.String, entInsurance.ContactPhNo);
                Commons.ADDParameter(ref lstParam, "@MobileNo", DbType.String, entInsurance.MobileNo);
                Commons.ADDParameter(ref lstParam, "@ContactEmailID", DbType.String, entInsurance.ContactEmail);
                Commons.ADDParameter(ref lstParam, "@Notes", DbType.String, entInsurance.Notes);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entInsurance.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertInsurance", lstParam);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(cnt);
        }
Ejemplo n.º 4
0
        public int UpdateConsultant(EntityConsultant entConsultant)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@ConsCode", DbType.String, entConsultant.ConsultantCode);
                Commons.ADDParameter(ref lstParam, "@ConsFirstName", DbType.String, entConsultant.FirstName);
                Commons.ADDParameter(ref lstParam, "@ConsMiddleName", DbType.String, entConsultant.MiddleName);
                Commons.ADDParameter(ref lstParam, "@ConsLastName", DbType.String, entConsultant.LastName);
                Commons.ADDParameter(ref lstParam, "@ConsAddress", DbType.String, entConsultant.Address);
                Commons.ADDParameter(ref lstParam, "@ConsDOB", DbType.DateTime, entConsultant.DOB);
                Commons.ADDParameter(ref lstParam, "@ConsDOJ", DbType.DateTime, entConsultant.DOJ);
                Commons.ADDParameter(ref lstParam, "@ChangeBy", DbType.String, entConsultant.ChaneBy);
                Commons.ADDParameter(ref lstParam, "@WardNo", DbType.String, entConsultant.WardNo);
                Commons.ADDParameter(ref lstParam, "@Fees", DbType.String, entConsultant.Fees);
                cnt = mobjDataAcces.ExecuteQuery("sp_UpdateConsultant", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("ConsultantBLL - UpdateConsultant(EntityConsultant entConsultant)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 5
0
        public int InsertSupplier(EntitySupplier entSupplier)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@SupplierCode", DbType.String, entSupplier.SupplierCode);
                Commons.ADDParameter(ref lstParam, "@SupplierName", DbType.String, entSupplier.SupplierName);
                Commons.ADDParameter(ref lstParam, "@Address", DbType.String, entSupplier.Address);
                Commons.ADDParameter(ref lstParam, "@PhoneNo", DbType.String, entSupplier.PhoneNo);
                Commons.ADDParameter(ref lstParam, "@MobileNo", DbType.String, entSupplier.MobileNo);
                Commons.ADDParameter(ref lstParam, "@VATCSTNo", DbType.String, entSupplier.VATCSTNo);
                Commons.ADDParameter(ref lstParam, "@ExciseNo", DbType.String, entSupplier.ExciseNo);
                Commons.ADDParameter(ref lstParam, "@Email", DbType.String, entSupplier.Email);
                Commons.ADDParameter(ref lstParam, "@ServiceTaxNo", DbType.String, entSupplier.ServiceTaxNo);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entSupplier.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertSupplier ", lstParam);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(cnt);
        }
Ejemplo n.º 6
0
        public int InsertOPD(EntityOPD entOPD)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@OPDDesc", DbType.String, entOPD.OPDDesc);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertOPD ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("OPDBLL - InsertOPD(EntityOPD entOPD)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 7
0
        public int InsertReligion(EntitySurgeryMaster entReligion)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@NameOfSurgery", DbType.String, entReligion.NameOfSurgery);
                Commons.ADDParameter(ref lstParam, "@OperationalProcedure", DbType.String, entReligion.OperationalProcedure);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertSurgeryMaster ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("TabletMasterBLL - InsertReligion(EntityReligion entReligion)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 8
0
        public int InsertOccupation(EntityOccupation entOccupation)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@OccupationDesc", DbType.String, entOccupation.OccupationDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entOccupation.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertOccupation ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("OccupationBLL - InsertOccupation(EntityOccupation entOccupation)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 9
0
        public int InsertReligion(EntityOperationCategory entReligion)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@CategoryCode", DbType.String, entReligion.CategoryCode);
                Commons.ADDParameter(ref lstParam, "@CategoryName", DbType.String, entReligion.CategoryName);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertOperationCat", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("OperationCategoryBLL - InsertOperationCat(EntityOperationCategory entReligion)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 10
0
        public int InsertGroup(EntityGroup entGroup)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@GroupDesc", DbType.String, entGroup.GroupDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entGroup.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertGroup ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("GroupBLL - InsertGroup(EntityGroup entGroup)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 11
0
        public int InsertReligion(EntityTabletMaster entReligion)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@TabletCode", DbType.String, entReligion.TabletCode);
                Commons.ADDParameter(ref lstParam, "@MedicineName", DbType.String, entReligion.MedicineName);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertTablet ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("TabletMasterBLL - InsertReligion(EntityReligion entReligion)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 12
0
        public int InsertItem(EntityItem entItem)
        {
            int cnt = 0;

            try
            {
                if (entItem.IsCheked == 0)
                {
                    List <SqlParameter> lstParam = new List <SqlParameter>();
                    Commons.ADDParameter(ref lstParam, "@ItemCode", DbType.String, entItem.ItemCode);
                    Commons.ADDParameter(ref lstParam, "@ItemDesc", DbType.String, entItem.ItemDesc);
                    Commons.ADDParameter(ref lstParam, "@ReorderLevel", DbType.Int32, entItem.ReorderLevel);
                    Commons.ADDParameter(ref lstParam, "@ReorderMaxLevel", DbType.Int32, entItem.ReorderMaxLevel);
                    Commons.ADDParameter(ref lstParam, "@UnitCode", DbType.String, entItem.UnitCode);
                    Commons.ADDParameter(ref lstParam, "@SupplierCode", DbType.String, entItem.SupplierCode);
                    Commons.ADDParameter(ref lstParam, "@OpenningBalance", DbType.Decimal, entItem.OpeningBalance);
                    Commons.ADDParameter(ref lstParam, "@Rate", DbType.Decimal, entItem.Rate);
                    Commons.ADDParameter(ref lstParam, "@GroupId", DbType.Int32, entItem.GroupId);
                    Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entItem.EntryBy);
                    cnt = mobjDataAcces.ExecuteQuery("sp_InsertItem ", lstParam);
                }
                else
                {
                    List <SqlParameter> lstParam = new List <SqlParameter>();
                    Commons.ADDParameter(ref lstParam, "@ItemCode", DbType.String, entItem.ItemCode);
                    Commons.ADDParameter(ref lstParam, "@ItemDesc", DbType.String, entItem.ItemDesc);
                    Commons.ADDParameter(ref lstParam, "@ReorderLevel", DbType.Int32, entItem.ReorderLevel);
                    Commons.ADDParameter(ref lstParam, "@ReorderMaxLevel", DbType.Int32, entItem.ReorderMaxLevel);
                    Commons.ADDParameter(ref lstParam, "@UnitCode", DbType.String, entItem.UnitCode);
                    Commons.ADDParameter(ref lstParam, "@SupplierCode", DbType.String, entItem.SupplierCode);
                    Commons.ADDParameter(ref lstParam, "@OpenningBalance", DbType.Decimal, entItem.OpeningBalance);
                    Commons.ADDParameter(ref lstParam, "@Rate", DbType.Decimal, entItem.Rate);
                    Commons.ADDParameter(ref lstParam, "@GroupId", DbType.Int32, entItem.GroupId);
                    Commons.ADDParameter(ref lstParam, "@ManifacturingDate", DbType.DateTime, entItem.ManifacturingDate);
                    Commons.ADDParameter(ref lstParam, "@ExpiryDate", DbType.DateTime, entItem.ExpiryDate);
                    Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entItem.EntryBy);
                    cnt = mobjDataAcces.ExecuteQuery("sp_InsertItem ", lstParam);
                }
            }
            catch (Exception ex)
            {
                Commons.FileLog("ItemBLL - InsertItem(EntityItem entItem)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 13
0
        public int InsertUnit(EntityUnit entUnit)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@UnitCode", DbType.String, entUnit.UnitCode);
                Commons.ADDParameter(ref lstParam, "@UnitDesc", DbType.String, entUnit.UnitDesc);

                cnt = mobjDataAcces.ExecuteQuery("sp_InsertUnit ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("UnitBLL - InsertUnit(EntityUnit entUnit)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 14
0
        public int InsertGender(EntityGender entGender)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@GenderCode", DbType.String, entGender.GenderCode);
                Commons.ADDParameter(ref lstParam, "@GenderDesc", DbType.String, entGender.GenderDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entGender.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertGender ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("GenderBLL - InsertGender(EntityGender entGender)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 15
0
        public int InsertDignosis(EntityDignosis entDignosis)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@DignosisCode", DbType.String, entDignosis.DignosisCode);
                Commons.ADDParameter(ref lstParam, "@DignosisDesc", DbType.String, entDignosis.DignosisDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entDignosis.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertDignosis ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("DignosisBLL - InsertDignosis(EntityDignosis entDignosis)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 16
0
        public int InsertCurrency(EntityCurrency entCurrency)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@CurrencyCode", DbType.String, entCurrency.CurrencyCode);
                Commons.ADDParameter(ref lstParam, "@CurrencyDesc", DbType.String, entCurrency.CurrencyDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entCurrency.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertCurrency", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("CurrencyBLL -  InsertCurrency(EntityCurrency entCurrency)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 17
0
        public int UpdateTestMethod(EntityTestMethod entTest)
        {
            int cnt = 0;
            try
            {
                List<SqlParameter> lstParam = new List<SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@TestMethodId", DbType.String, entTest.TestMethodId);
                Commons.ADDParameter(ref lstParam, "@TestMethodDesc", DbType.String, entTest.TestMethodDesc);

                cnt = mobjDataAcces.ExecuteQuery("sp_UpdateTestMethod", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("TestMethodBLL -  UpdateTestMethod(EntityTestMethod entTest)", ex);
            }

            return cnt;
        }
Ejemplo n.º 18
0
        public int InsertCity(EntityCity entCity)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@StateId", DbType.Int32, entCity.State);
                Commons.ADDParameter(ref lstParam, "@CityDesc", DbType.String, entCity.CityDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entCity.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertCity ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("CityBLL - InsertCity(EntityCity entCity)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 19
0
        public int InsertPatient(EntityPatientType entPatient)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@PatientCode", DbType.String, entPatient.PatientCode);
                Commons.ADDParameter(ref lstParam, "@PatientDesc", DbType.String, entPatient.PatientDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entPatient.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertPatient ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("PatientTypeBLL -InsertPatient(EntityPatientType entPatient)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 20
0
        public int InsertReligion(EntityNurse entReligion)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@NurseCode", DbType.String, entReligion.NurseCode);
                Commons.ADDParameter(ref lstParam, "@NurseName", DbType.String, entReligion.NurseName);
                Commons.ADDParameter(ref lstParam, "@DeptId", DbType.Int32, entReligion.DeptId);
                Commons.ADDParameter(ref lstParam, "@DepartmentName", DbType.String, entReligion.DepartmentName);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertNurse ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("NurseBLL - InsertReligion(EntityReligion entReligion)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 21
0
        public int InsertConsultantCharges(EntityConsultantChargeMaster entChargeMaster)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@ConsultantId", DbType.Int32, entChargeMaster.ConsultantId);
                Commons.ADDParameter(ref lstParam, "@Ward", DbType.Int32, entChargeMaster.WardNo);
                Commons.ADDParameter(ref lstParam, "@Charge", DbType.Decimal, entChargeMaster.Charge);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entChargeMaster.UserName);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertConsultantCharge", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("ConsultantChargeBLL - InsertConsultantCharges(EntityConsultantChargeMaster entChargeMaster)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 22
0
        public int InsertInitial(EntityInitials entInitial)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@InitialCode", DbType.String, entInitial.InitialCode);
                Commons.ADDParameter(ref lstParam, "@InitialDesc", DbType.String, entInitial.InitialDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entInitial.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertInitial", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("InitialsBLL -  InsertInitial(EntityInitials entInitial)", ex);
            }

            return(cnt);
        }
Ejemplo n.º 23
0
        public int InsertState(EntityState entState)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@StateCode", DbType.String, entState.StateCode);
                Commons.ADDParameter(ref lstParam, "@CountryId", DbType.Int32, entState.Country);
                Commons.ADDParameter(ref lstParam, "@StateDesc", DbType.String, entState.StateDesc);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entState.EntryBy);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertState ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("StateBLL - InsertState(EntityState entState)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 24
0
        public int InsertBedMaster(EntityBedMaster entBedMaster)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@BedNo", DbType.String, entBedMaster.BedNo);
                Commons.ADDParameter(ref lstParam, "@RoomId", DbType.Int32, entBedMaster.RoomId);
                Commons.ADDParameter(ref lstParam, "@FloorNo", DbType.Int32, entBedMaster.FloorNo);
                Commons.ADDParameter(ref lstParam, "@CategoryId", DbType.Int32, entBedMaster.CategoryId);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertBedMaster", lstParam);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(cnt);
        }
Ejemplo n.º 25
0
        public int UpdateRooms(EnitiyRoomMaster entRoom)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                //Commons.ADDParameter(ref lstParam, "@RoomId", DbType.String, entRoom.RoomId);
                Commons.ADDParameter(ref lstParam, "@RoomNo", DbType.String, entRoom.RoomNo);
                Commons.ADDParameter(ref lstParam, "@FloorNo", DbType.Int32, entRoom.FloorNo);
                Commons.ADDParameter(ref lstParam, "@CategoryId", DbType.String, entRoom.CategoryId);
                cnt = mobjDataAcces.ExecuteQuery("sp_UpdateRoom", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("RoomMasterBLL -  UpdateRooms(EnitiyRoomMaster entRoom)", ex);
            }

            return(cnt);
        }
Ejemplo n.º 26
0
        public int UpdateProduct(EntityProduct entProduct)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@ProductId", DbType.String, entProduct.ProductId);
                Commons.ADDParameter(ref lstParam, "@ProductName", DbType.String, entProduct.ProductName);
                Commons.ADDParameter(ref lstParam, "@UOM", DbType.String, entProduct.UOM);
                Commons.ADDParameter(ref lstParam, "@SubUOM", DbType.String, entProduct.SubUOM);
                Commons.ADDParameter(ref lstParam, "@Price", DbType.String, entProduct.Price);

                cnt = mobjDataAcces.ExecuteQuery("sp_UpdateProduct", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("ProductBLL -  UpdateProductEntityProduct entProduct)", ex);
            }

            return(cnt);
        }
Ejemplo n.º 27
0
        public int InsertAppoinment(EntityBookAppoinment entAppoinment)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@PatientCode", DbType.String, entAppoinment.PatientCode);
                Commons.ADDParameter(ref lstParam, "@FullName", DbType.String, entAppoinment.FullName);
                Commons.ADDParameter(ref lstParam, "@DeptId", DbType.Int32, entAppoinment.DepartmentId);
                Commons.ADDParameter(ref lstParam, "@OPD", DbType.Int32, entAppoinment.OPDRoom);
                Commons.ADDParameter(ref lstParam, "@ConsutingDr", DbType.Int32, entAppoinment.ConsultingDr);
                Commons.ADDParameter(ref lstParam, "@VisitType", DbType.String, entAppoinment.VisitType);
                Commons.ADDParameter(ref lstParam, "@Shift", DbType.String, entAppoinment.Shift);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertAppoinment ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("BookAppoinmentBLL - int InsertAppoinment(EntityBookAppoinment entAppoinment)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 28
0
        public int InsertCategory(EntityRoomCategory entRoomCat)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@CategoryCode", DbType.String, entRoomCat.CategoryCode);
                Commons.ADDParameter(ref lstParam, "@CategoryDesc", DbType.String, entRoomCat.CategoryDesc);
                Commons.ADDParameter(ref lstParam, "@Rate", DbType.Decimal, entRoomCat.Rate);
                Commons.ADDParameter(ref lstParam, "@EntryBy", DbType.String, entRoomCat.EntryBy);
                Commons.ADDParameter(ref lstParam, "@IsICU", DbType.Boolean, entRoomCat.IsICU);
                Commons.ADDParameter(ref lstParam, "@IsOT", DbType.Boolean, entRoomCat.IsOT);
                cnt = mobjDataAcces.ExecuteQuery("sp_InsertCategory", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("RoomCategoryBLL -  InsertCategory(EntityRoomCategory entRoomCat)", ex);
            }

            return(cnt);
        }
Ejemplo n.º 29
0
        public int InsertReligion(EntityAnaesthetist entReligion)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@AnaesthetistCode", DbType.String, entReligion.AnaesthetistCode);
                Commons.ADDParameter(ref lstParam, "@AnaesthetistName", DbType.String, entReligion.AnaesthetistName);
                Commons.ADDParameter(ref lstParam, "@TypeOfAnaesthetist", DbType.String, entReligion.TypeOfAnaesthetist);
                Commons.ADDParameter(ref lstParam, "@CategoryName", DbType.String, entReligion.CategoryName);
                Commons.ADDParameter(ref lstParam, "@CategoryId", DbType.Int32, entReligion.CategoryId);
                Commons.ADDParameter(ref lstParam, "@ConsultCharges", DbType.Decimal, entReligion.ConsultCharges);

                cnt = mobjDataAcces.ExecuteQuery("sp_InsertAnaesthetist ", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("AnaesthetistBLL - InsertAnaesthetist(EntityAnaesthetist entReligion)", ex);
            }
            return(cnt);
        }
Ejemplo n.º 30
0
        public int DeleteRequisition(EntityMaterialRequisition entRequisition)
        {
            int cnt = 0;

            try
            {
                List <SqlParameter> lstParam = new List <SqlParameter>();
                Commons.ADDParameter(ref lstParam, "@RequisitionCode", DbType.String, entRequisition.RequisitionCode);
                cnt = mobjDataAcces.ExecuteQuery("sp_DeleteRequisitionDT", lstParam);
            }
            catch (Exception ex)
            {
                Commons.FileLog("RequisitionBLL - DeleteRequisition(EntityRequisition entRequisition)", ex);
            }
            return(cnt);
        }