コード例 #1
0
        public string Add(TestTypeRequest ttData)
        {
            try
            {
                string stProc = AddTestType;
                var    retVal = new SqlParameter("@Scope_output", 1);
                retVal.Direction = ParameterDirection.Output;
                var pList = new List <SqlParameter>
                {
                    new SqlParameter("@TestType", ttData.testTypeName ?? ttData.testTypeName),
                    new SqlParameter("@Isactive", ttData.isactive ?? ttData.isactive),
                    new SqlParameter("@Comments", ttData.comments ?? ttData.comments),
                    new SqlParameter("@Createdby", ttData.createdby),
                    new SqlParameter("@Updatedby", ttData.updatedby),

                    retVal
                };
                UtilityDL.ExecuteNonQuery(stProc, pList);
                return("Test type added successfully");
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #2
0
        public async Task <int> CreateUserAsync(UserModel userModel, string password)
        {
            var recInsert = 0;

            try
            {
                var stProc = CreateUser;
                var retVal = new SqlParameter("@SCOPE_OUTPUT", 10)
                {
                    Direction = ParameterDirection.Output
                };
                var pList = new List <SqlParameter>()
                {
                    new SqlParameter("@USEREMAIL", userModel.Email),
                    new SqlParameter("@PASSWORD", password),
                    new SqlParameter("@FIRSTNAME", userModel.FirstName ?? string.Empty),
                    new SqlParameter("@LASTNAME", userModel.LastName ?? string.Empty),
                    retVal
                };
                recInsert = Convert.ToInt32(UtilityDL.ExecuteNonQuery(stProc, pList, true));
                return(recInsert);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #3
0
 public string AddSample(AddSubjectSampleRequest ssData)
 {
     try
     {
         string stProc = AddSampleCollection;
         var    retVal = new SqlParameter("@Scope_output", 1);
         retVal.Direction = ParameterDirection.Output;
         var pList = new List <SqlParameter>
         {
             new SqlParameter("@UniqueSubjectID", ssData.uniqueSubjectId ?? ssData.uniqueSubjectId),
             new SqlParameter("@BarcodeNo", ssData.barcodeNo ?? ssData.barcodeNo),
             new SqlParameter("@SampleCollectionDate", ssData.sampleCollectionDate ?? ssData.sampleCollectionDate),
             new SqlParameter("@SampleCollectionTime", ssData.sampleCollectionTime ?? ssData.sampleCollectionTime),
             new SqlParameter("@Reason", ssData.reason ?? ssData.reason),
             new SqlParameter("@CollectionFrom", ssData.collectionFrom),
             new SqlParameter("@CollectedBy", ssData.collectedBy),
             retVal
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
         return($"Sample collected successfully");
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #4
0
 public void SubjectPregnancy(SubjectPregnancyDetailRequest spData, string uniqueSubID)
 {
     try
     {
         var stProc = AddSubjectPregnancyDetail;
         var retVal = new SqlParameter("@SCOPE_OUTPUT", 1)
         {
             Direction = ParameterDirection.Output
         };
         var pList = new List <SqlParameter>()
         {
             new SqlParameter("@UniqueSubjectID", uniqueSubID),
             new SqlParameter("@RCHID", spData.rchId.ToCheckNull()),
             new SqlParameter("@ECNumber", spData.ecNumber.ToCheckNull()),
             new SqlParameter("@LMP_Date", spData.lmpDate.ToCheckNull()),
             new SqlParameter("@G", Convert.ToInt32(spData.g)),
             new SqlParameter("@P", Convert.ToInt32(spData.p)),
             new SqlParameter("@L", Convert.ToInt32(spData.l)),
             new SqlParameter("@A", Convert.ToInt32(spData.a)),
             new SqlParameter("@UpdatedBy", Convert.ToInt32(spData.updatedBy)),
             retVal
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
 public string Add(Patient patient)
 {
     try
     {
         string stProc = AddPatient;
         var    retVal = new SqlParameter("@SCOPE_OUTPUT", 1)
         {
             Direction = ParameterDirection.Output
         };
         var pList = new List <SqlParameter>
         {
             new SqlParameter("@GID", patient.GovtId),
             new SqlParameter("@FIRSTNAME", patient.FirstName ?? patient.FirstName),
             new SqlParameter("@LASTNAME", patient.LastName ?? patient.LastName),
             new SqlParameter("@LOCATION", patient.Location ?? patient.Location),
             retVal
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
         return("Patient added successfully");
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #6
0
 public void SubjectAddress(SubjectAddressDetailRequest saData, string uniqueSubId)
 {
     try
     {
         var stProc = AddSubjectAddressDetail;
         var retVal = new SqlParameter("@SCOPE_OUTPUT", 1)
         {
             Direction = ParameterDirection.Output
         };
         var pList = new List <SqlParameter>()
         {
             new SqlParameter("@UniqueSubjectID", uniqueSubId),
             new SqlParameter("@Religion_Id", Convert.ToInt32(saData.religionId)),
             new SqlParameter("@Caste_Id", Convert.ToInt32(saData.casteId)),
             new SqlParameter("@Community_Id", Convert.ToInt32(saData.communityId)),
             new SqlParameter("@Address1", saData.address1.ToCheckNull()),
             new SqlParameter("@Address2", saData.address2.ToCheckNull()),
             new SqlParameter("@Address3", saData.address3.ToCheckNull()),
             new SqlParameter("@Pincode", saData.pincode.ToCheckNull()),
             new SqlParameter("@StateName", saData.stateName.ToCheckNull()),
             new SqlParameter("@UpdatedBy", Convert.ToInt32(saData.updatedBy)),
             retVal
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #7
0
        public async Task <int> AddNewUserAsync(AddUserRequest addUser, string password)
        {
            var recInsert = 0;

            try
            {
                var stProc = AddUser;
                var retVal = new SqlParameter("@SCOPE_OUTPUT", 1)
                {
                    Direction = ParameterDirection.Output
                };
                var pList = new List <SqlParameter>()
                {
                    new SqlParameter("@UserType_ID", addUser.userTypeId),
                    new SqlParameter("@UserRole_ID", addUser.userRoleId),
                    new SqlParameter("@User_gov_code", addUser.userGovCode),
                    new SqlParameter("@Username", addUser.userName),
                    new SqlParameter("@Password", password),
                    new SqlParameter("@StateID", addUser.stateId),
                    new SqlParameter("@CentralLabId", addUser.centralLabId),
                    new SqlParameter("@MolecularLabId", addUser.molecularLabId),
                    new SqlParameter("@DistrictID", addUser.districtId),
                    new SqlParameter("@BlockID", addUser.blockId),
                    new SqlParameter("@CHCID", addUser.chcId),
                    new SqlParameter("@PHCID", addUser.phcId),
                    new SqlParameter("@SCID", addUser.scId),
                    new SqlParameter("@RIID", addUser.riId ?? string.Empty),
                    new SqlParameter("@FirstName", addUser.firstName ?? addUser.firstName),
                    new SqlParameter("@MiddleName", addUser.middleName ?? string.Empty),
                    new SqlParameter("@LastName", addUser.lastName ?? string.Empty),
                    new SqlParameter("@ContactNo1", addUser.contactNo1 ?? string.Empty),
                    new SqlParameter("@ContactNo2", addUser.contactNo2 ?? string.Empty),
                    new SqlParameter("@Email", addUser.email ?? addUser.email),
                    new SqlParameter("@GovIDType_ID", addUser.govIdTypeId),
                    new SqlParameter("@GovIDDetails", addUser.govIdDetails ?? string.Empty),
                    new SqlParameter("@Address", addUser.address ?? string.Empty),
                    new SqlParameter("@Pincode", addUser.pincode ?? string.Empty),
                    new SqlParameter("@CreatedBy", addUser.createdBy),
                    new SqlParameter("@UpdatedBy", addUser.updatedBy),
                    new SqlParameter("@Comments", addUser.comments ?? string.Empty),
                    new SqlParameter("@IsActive", addUser.isActive ?? addUser.isActive),
                    //  new SqlParameter("@DigitalSignature", addUser.DigitalSignature ?? string.Empty),
                    retVal
                };
                recInsert = Convert.ToInt32(UtilityDL.ExecuteNonQuery(stProc, pList, true));
                return(recInsert);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #8
0
 public void SubjectParent(SubjectParentDetailRequest spaData, string uniqueSubID)
 {
     try
     {
         var stProc = AddSubjectParentDetail;
         var retVal = new SqlParameter("@SCOPE_OUTPUT", 1)
         {
             Direction = ParameterDirection.Output
         };
         var pList = new List <SqlParameter>()
         {
             new SqlParameter("@UniqueSubjectID", uniqueSubID),
             new SqlParameter("@Mother_FirstName", spaData.motherFirstName.ToCheckNull()),
             new SqlParameter("@Mother_MiddleName", spaData.motherMiddleName.ToCheckNull()),
             new SqlParameter("@Mother_LastName", spaData.motherLastName.ToCheckNull()),
             new SqlParameter("@Mother_GovIdType_ID", Convert.ToInt32(spaData.motherGovIdTypeId)),
             new SqlParameter("@Mother_GovIdDetail", spaData.motherGovIdDetail.ToCheckNull()),
             new SqlParameter("@Mother_ContactNo", spaData.motherContactNo.ToCheckNull()),
             new SqlParameter("@Father_FirstName", spaData.fatherFirstName.ToCheckNull()),
             new SqlParameter("@Father_MiddleName", spaData.fatherMiddleName.ToCheckNull()),
             new SqlParameter("@Father_LastName", spaData.fatherLastName.ToCheckNull()),
             new SqlParameter("@Father_GovIdType_ID", Convert.ToInt32(spaData.fatherGovIdTypeId)),
             new SqlParameter("@Father_GovIdDetail", spaData.fatherGovIdDetail.ToCheckNull()),
             new SqlParameter("@Father_ContactNo", spaData.fatherContactNo.ToCheckNull()),
             new SqlParameter("@Gaurdian_FirstName", spaData.gaurdianFirstName.ToCheckNull()),
             new SqlParameter("@Gaurdian_MiddleName", spaData.gaurdianMiddleName.ToCheckNull()),
             new SqlParameter("@Gaurdian_LastName", spaData.gaurdianLastName.ToCheckNull()),
             new SqlParameter("@Guardian_GovIdType_ID", Convert.ToInt32(spaData.gaurdianGovIdTypeId)),
             new SqlParameter("@Guardian_GovIdDetail", spaData.gaurdianGovIdDetail.ToCheckNull()),
             new SqlParameter("@Gaurdian_ContactNo", spaData.gaurdianContactNo.ToCheckNull()),
             new SqlParameter("@RBSKId", spaData.rbskId.ToCheckNull()),
             new SqlParameter("@SchoolName", spaData.schoolName.ToCheckNull()),
             new SqlParameter("@SchoolAddress1", spaData.schoolAddress1.ToCheckNull()),
             new SqlParameter("@SchoolAddress2", spaData.schoolAddress2.ToCheckNull()),
             new SqlParameter("@SchoolAddress3", spaData.schoolAddress3.ToCheckNull()),
             new SqlParameter("@SchoolPincode", spaData.schoolPincode.ToCheckNull()),
             new SqlParameter("@SchoolCity", spaData.schoolCity.ToCheckNull()),
             new SqlParameter("@SchoolState", spaData.schoolState.ToCheckNull()),
             new SqlParameter("@Standard", spaData.standard.ToCheckNull()),
             new SqlParameter("@Section", spaData.section.ToCheckNull()),
             new SqlParameter("@RollNo", spaData.rollNo.ToCheckNull()),
             new SqlParameter("@UpdatedBy", Convert.ToInt32(spaData.updatedBy)),
             retVal
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #9
0
 public void AddLoginDetails(int userId, string userName, string deviceId, string loginFrom)
 {
     try
     {
         var stProc = LoginUserDetail;
         var pList  = new List <SqlParameter>()
         {
             new SqlParameter("@UserId", userId),
             new SqlParameter("@UserName", userName ?? userName),
             new SqlParameter("@DeviceId", deviceId.ToCheckNull()),
             new SqlParameter("@LoginFrom", loginFrom ?? loginFrom),
         };
         UtilityDL.ExecuteNonQuery(stProc, pList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #10
0
        public string Add(HNINRequest hData)
        {
            try
            {
                string stProc = AddHNIN;
                var    retVal = new SqlParameter("@Scope_output", 1);
                retVal.Direction = ParameterDirection.Output;
                var pList = new List <SqlParameter>
                {
                    new SqlParameter("@Facilitytype_ID", hData.facilityTypeId),
                    new SqlParameter("@Facility_name", hData.facilityName ?? hData.facilityName),
                    new SqlParameter("@NIN2HFI", hData.nin2hfi ?? hData.nin2hfi),
                    new SqlParameter("@StateID", hData.stateId),
                    new SqlParameter("@DistrictID", hData.districtId),
                    new SqlParameter("@Taluka", hData.taluka ?? hData.taluka),
                    new SqlParameter("@BlockID", hData.blockId),
                    new SqlParameter("@Address", hData.address ?? hData.address),
                    new SqlParameter("@Pincode", hData.pincode ?? hData.pincode),
                    new SqlParameter("@Landline", hData.landline ?? hData.landline),
                    new SqlParameter("@Incharge_name", hData.inchargeName ?? hData.inchargeName),
                    new SqlParameter("@Incharge_contactno", hData.inchargeContactNo ?? hData.inchargeContactNo),
                    new SqlParameter("@Incharge_EmailId", hData.inchargeEmailId ?? hData.inchargeEmailId),
                    new SqlParameter("@Isactive", hData.isActive ?? hData.isActive),
                    new SqlParameter("@Latitude", hData.latitude ?? hData.latitude),
                    new SqlParameter("@Longitude", hData.longitude ?? hData.longitude),
                    new SqlParameter("@Comments", hData.comments ?? hData.comments),
                    new SqlParameter("@Createdby", hData.createdBy),
                    new SqlParameter("@Updatedby", hData.updatedBy),

                    retVal
                };
                UtilityDL.ExecuteNonQuery(stProc, pList);
                return("HNIN added successfully");
            }
            catch (Exception e)
            {
                throw e;
            }
        }