示例#1
0
        public int UpdateActivityLog(MyActivityBO myActivityBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(myActivityBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspMyActivity";
            sqlHelper.AddParameter(command, "@Mode", myActivityBO.Mode, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", myActivityBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ActivityId", myActivityBO.ActivityId, ParameterDirection.Input);
            if (myActivityBO.ActivityDeviationId != 0)
            {
                sqlHelper.AddParameter(command, "@ActivityDeviationId", myActivityBO.ActivityDeviationId, ParameterDirection.Input);
            }
            sqlHelper.AddParameter(command, "@MobileReferenceNo", myActivityBO.MobileReferenceNo, ParameterDirection.Input);
            if (!string.IsNullOrEmpty(myActivityBO.MobileSyncDate))
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", Convert.ToDateTime(myActivityBO.MobileSyncDate), ParameterDirection.Input);
            }
            sqlHelper.AddParameter(command, "@MobileTransactionDate", Convert.ToDateTime(myActivityBO.MobileTransactionDate), ParameterDirection.Input);
            if (!string.IsNullOrEmpty(myActivityBO.CheckIn))
            {
                sqlHelper.AddParameter(command, "@CheckIn", Convert.ToDateTime(myActivityBO.CheckIn), ParameterDirection.Input);
            }
            if (!string.IsNullOrEmpty(myActivityBO.CheckOut))
            {
                sqlHelper.AddParameter(command, "@CheckOut", Convert.ToDateTime(myActivityBO.CheckOut), ParameterDirection.Input);
            }
            if (!string.IsNullOrEmpty(myActivityBO.ActivityPlannedDate))
            {
                sqlHelper.AddParameter(command, "@ActivityPlannedDate", Convert.ToDateTime(myActivityBO.ActivityPlannedDate), ParameterDirection.Input);
            }

            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#2
0
        internal int UpdateParameters(CompetitorBO competitorBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(competitorBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "updateParameters";
            sqlHelper.AddParameter(command, "@ShopId", competitorBO.ShopId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", competitorBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ProductID", competitorBO.ProductId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ParameterList", competitorBO.ParameterList, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@QuantityData", competitorBO.QuantityData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", competitorBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", competitorBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", competitorBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobileTransactionDate", competitorBO.MobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobRefNo", competitorBO.MobRefNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", competitorBO.GpsSource, ParameterDirection.Input);
            if (competitorBO.MobileSyncDate != "" && competitorBO.ServerSyncDate != "")
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", competitorBO.MobileSyncDate, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@ServerSyncDate", competitorBO.ServerSyncDate, ParameterDirection.Input);
            }
            if (competitorBO.signalStrength != null && competitorBO.signalStrength != string.Empty && competitorBO.signalStrength != "")
            {
                sqlHelper.AddParameter(command, "@signalStrength", competitorBO.signalStrength, ParameterDirection.Input);
            }
            if (competitorBO.networkProvider != null && competitorBO.networkProvider != string.Empty && competitorBO.networkProvider != "")
            {
                sqlHelper.AddParameter(command, "@networkProvider", competitorBO.networkProvider, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#3
0
        internal int UpdateMonthlyTourPlan(TourPlanBO tourPlanBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(tourPlanBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspTourPlan";
            sqlHelper.AddParameter(command, "@Mode", "1", ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@TourPlanDate", tourPlanBO.TourPlanDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", tourPlanBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@SubmissionRemark", tourPlanBO.SubmissionRemark, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@SubmissionDate", tourPlanBO.SubmissionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@SubmittedBy", Convert.ToInt32(tourPlanBO.SubmittedBy), ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@lattitude", tourPlanBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", tourPlanBO.Longitude, ParameterDirection.Input);
            if (!String.IsNullOrEmpty(tourPlanBO.ProcessName))
            {
                sqlHelper.AddParameter(command, "@processName", tourPlanBO.ProcessName, ParameterDirection.Input);
            }
            sqlHelper.AddParameter(command, "@mobileOrderDate", tourPlanBO.MobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileReferenceNo", tourPlanBO.MobileReferenceNo, ParameterDirection.Input);
            if (tourPlanBO.MobileSyncDate != DateTime.MinValue)
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", tourPlanBO.MobileSyncDate, ParameterDirection.Input);
            }
            sqlHelper.AddParameter(command, "@GpsSource", tourPlanBO.GpsSource, ParameterDirection.Input);
            SqlParameter outparam = command.Parameters.Add("@MonthlyTourPlanId", SqlDbType.Int);

            outparam.Direction = ParameterDirection.Output;
            sqlHelper.ExecuteNonQuery(command);
            return(Convert.ToInt32(outparam.Value));
        }
示例#4
0
        internal int updateCustomerDetails(EditCustomerBO editCustomerBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(editCustomerBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "[UpdateEditCustomerDetails]";
            sqlHelper.AddParameter(command, "@UserId", editCustomerBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ShopId", editCustomerBO.ShopId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ContactPersonName", editCustomerBO.ContactName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileNumber", editCustomerBO.MobileNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@PinCode", editCustomerBO.PinCode, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Address", editCustomerBO.Address, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Landmark", editCustomerBO.Landmark, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobileTransactionDate", editCustomerBO.MobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", editCustomerBO.GpsSource, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Latitude", editCustomerBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Longitude", editCustomerBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ProcessName", editCustomerBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ShopPotential", editCustomerBO.ShopPotential, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GstNumber", editCustomerBO.GstNumber, ParameterDirection.Input);
            if (editCustomerBO.MobileSyncDate != null)
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", editCustomerBO.MobileSyncDate, ParameterDirection.Input);
            }

            if (editCustomerBO.MobileReferenceNo != null && editCustomerBO.MobileReferenceNo != string.Empty && editCustomerBO.MobileReferenceNo != "")
            {
                sqlHelper.AddParameter(command, "@mobileRefNumber", editCustomerBO.MobileReferenceNo, ParameterDirection.Input);
            }

            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#5
0
        internal int UpdateBTLDetails(BTLActivityBO btlActivityBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(btlActivityBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspBTLActivity";
            sqlHelper.AddParameter(command, "@Mode", btlActivityBO.Mode, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", btlActivityBO.UserId, ParameterDirection.Input);
            if (!string.IsNullOrEmpty(btlActivityBO.OrganizationId))
            {
                sqlHelper.AddParameter(command, "@OrganizationId", btlActivityBO.OrganizationId, ParameterDirection.Input);
            }
            sqlHelper.AddParameter(command, "@BTLActivityId", btlActivityBO.BTLActivityId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ConfigFieldIds", btlActivityBO.ConfigFieldIds, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ConfigFieldValues", btlActivityBO.ConfigFieldValues, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Latitude", btlActivityBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Longitude", btlActivityBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileTransactionDate", btlActivityBO.MobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileReferenceNo", btlActivityBO.MobileReferenceNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", btlActivityBO.GpsSource, ParameterDirection.Input);
            if (!string.IsNullOrEmpty(btlActivityBO.Attendees))
            {
                sqlHelper.AddParameter(command, "@Attendees", btlActivityBO.Attendees, ParameterDirection.Input);
            }
            if (!string.IsNullOrEmpty(btlActivityBO.MobileSyncDate))
            {
                sqlHelper.AddParameter(command, "@Syncdate", btlActivityBO.MobileSyncDate, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#6
0
        internal int UpdateFollowUp(FollowupBO followUpBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(followUpBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspWSFollowup";
            sqlHelper.AddParameter(command, "@Mode", "1", ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", followUpBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ShopId", followUpBO.ShopId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@FollowUpId", followUpBO.FollowUpId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Remarks", followUpBO.Remarks, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@FollowUpDate", followUpBO.FollowUpDate.ToString(), ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", followUpBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", followUpBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", followUpBO.ProcessName, ParameterDirection.Input);

            if (followUpBO.signalStrength != null && followUpBO.signalStrength != string.Empty && followUpBO.signalStrength != "")
            {
                sqlHelper.AddParameter(command, "@signalStrength", followUpBO.signalStrength, ParameterDirection.Input);
            }
            if (followUpBO.networkProvider != null && followUpBO.networkProvider != string.Empty && followUpBO.networkProvider != "")
            {
                sqlHelper.AddParameter(command, "@networkProvider", followUpBO.networkProvider, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#7
0
        internal int UpdateToDaysPlan(TodaysPlanBO todaysPlanBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(todaysPlanBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "[UpdateTodaysPlan]";
            sqlHelper.AddParameter(command, "@UserId", todaysPlanBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@PlanIdSet", todaysPlanBO.planIdSet, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", todaysPlanBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", todaysPlanBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", todaysPlanBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", todaysPlanBO.GpsSource, ParameterDirection.Input);

            sqlHelper.AddParameter(command, "@mobileTransactionDate", todaysPlanBO.MobileTransactionDate, ParameterDirection.Input);

            if (todaysPlanBO.MobileSyncDate != null)
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", todaysPlanBO.MobileSyncDate, ParameterDirection.Input);
            }

            if (todaysPlanBO.MobileRefNo != null && todaysPlanBO.MobileRefNo != string.Empty && todaysPlanBO.MobileRefNo != "")
            {
                sqlHelper.AddParameter(command, "@mobileRefNumber", todaysPlanBO.MobileRefNo, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#8
0
        internal int UpdateStockReconcilation(StockReconcilationBO stockReconcilationBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(stockReconcilationBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "UpdateStockReconcile";
            sqlHelper.AddParameter(command, "@UserId", stockReconcilationBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@StoreId", stockReconcilationBO.StoreId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ReconcileDate", stockReconcilationBO.ReconcileDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ProductIdData", stockReconcilationBO.ProductIdData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@QuantityData", stockReconcilationBO.QuantityData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ReturnReasonId", stockReconcilationBO.ReasonIdData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@RateData", stockReconcilationBO.RateData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", stockReconcilationBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", stockReconcilationBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", stockReconcilationBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UnloadStatus", stockReconcilationBO.UnloadStatus, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", stockReconcilationBO.GpsSource, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UpdatedDate", stockReconcilationBO.ReconcileDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UnitData", stockReconcilationBO.UnitData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Remarks", stockReconcilationBO.Remarks, ParameterDirection.Input);
            if (stockReconcilationBO.SyncDate != null)
            {
                sqlHelper.AddParameter(command, "@SyncDate", stockReconcilationBO.SyncDate, ParameterDirection.Input);
            }
            if (stockReconcilationBO.mobileDate != null && stockReconcilationBO.mobileDate != string.Empty && stockReconcilationBO.mobileDate != "")
            {
                sqlHelper.AddParameter(command, "@mobileSyncDate", stockReconcilationBO.mobileDate, ParameterDirection.Input);
            }
            if (stockReconcilationBO.MobileRefNo != null && stockReconcilationBO.MobileRefNo != string.Empty && stockReconcilationBO.MobileRefNo != "")
            {
                sqlHelper.AddParameter(command, "@mobileRefNumber", stockReconcilationBO.MobileRefNo, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#9
0
        internal int updateWorkingArea(WorkingAreaBO workingAreaBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(workingAreaBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspAttendanceModule";
            sqlHelper.AddParameter(command, "@Mode", "4", ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", workingAreaBO.userId, ParameterDirection.Input);

            sqlHelper.AddParameter(command, "@SelectedWorkAreaId", workingAreaBO.workingAreaMasterId, ParameterDirection.Input);

            sqlHelper.AddParameter(command, "@MobilePunchInDate", workingAreaBO.mobileCaptureDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@lat", workingAreaBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@lon", workingAreaBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", workingAreaBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobRefNo", workingAreaBO.MobRefNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", workingAreaBO.GpsSource, ParameterDirection.Input);
            if (workingAreaBO.ServerSyncDate != "" && workingAreaBO.MobileSyncDate != "")
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", workingAreaBO.MobileSyncDate, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@ServerSyncDate", workingAreaBO.ServerSyncDate, ParameterDirection.Input);
            }
            if (workingAreaBO.signalStrength != null && workingAreaBO.signalStrength != string.Empty && workingAreaBO.signalStrength != "")
            {
                sqlHelper.AddParameter(command, "@signalStrength", workingAreaBO.signalStrength, ParameterDirection.Input);
            }
            if (workingAreaBO.networkProvider != null && workingAreaBO.networkProvider != string.Empty && workingAreaBO.networkProvider != "")
            {
                sqlHelper.AddParameter(command, "@networkProvider", workingAreaBO.networkProvider, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#10
0
        internal int UpdateRecievedStock(StockBO stockBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(stockBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "UpdateReceivedQuantityPharma";
            sqlHelper.AddParameter(command, "@UserId", stockBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ShopID", stockBO.ShopId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ProductData", stockBO.ProductData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@quantitydata", stockBO.StockData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UnitData", stockBO.UnitData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", stockBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", stockBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", stockBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobileTransactionDate", stockBO.mobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@SyncDate", stockBO.SyncDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", stockBO.GpsSource, ParameterDirection.Input);
            if (stockBO.MobileReferenceNo != string.Empty)
            {
                sqlHelper.AddParameter(command, "@mobileReferenceNo", stockBO.MobileReferenceNo, ParameterDirection.Input);
            }
            if (stockBO.mobileDate != null && stockBO.mobileDate != string.Empty && stockBO.mobileDate != "")
            {
                sqlHelper.AddParameter(command, "@mobileSyncDate", stockBO.mobileDate, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#11
0
        internal int updateFeedback(MobileFeedbackBO mobileFeedbackBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(mobileFeedbackBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspAttendanceModule";
            sqlHelper.AddParameter(command, "@Mode", "5", ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", mobileFeedbackBO.userId, ParameterDirection.Input);

            sqlHelper.AddParameter(command, "@SelectedAnsIdSet", mobileFeedbackBO.selectedAnsIdSet, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@SelectedAnsSet", mobileFeedbackBO.selectedAnsSet, ParameterDirection.Input);

            sqlHelper.AddParameter(command, "@MobilePunchInDate", mobileFeedbackBO.mobileCaptureDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@lat", mobileFeedbackBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@lon", mobileFeedbackBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", mobileFeedbackBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobRefNo", mobileFeedbackBO.MobRefNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", mobileFeedbackBO.GpsSource, ParameterDirection.Input);
            if (mobileFeedbackBO.ServerSyncDate != "" && mobileFeedbackBO.MobileSyncDate != "")
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", mobileFeedbackBO.MobileSyncDate, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@ServerSyncDate", mobileFeedbackBO.ServerSyncDate, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#12
0
        internal int UpdateDoctorDetails(ShopBO shopBo)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(shopBo.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "UpdateDoctorDetailsAndroid"; //"uspWSUpdateCollectionDetails";
            sqlHelper.AddParameter(command, "@Name", shopBo.Name, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Address", shopBo.address, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileNo", shopBo.mobileNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Email", shopBo.email, ParameterDirection.Input);
            try
            {
                Convert.ToDateTime(shopBo.dob);
                sqlHelper.AddParameter(command, "@DOB", shopBo.dob, ParameterDirection.Input);
            }
            catch
            {
            }
            try
            {
                Convert.ToDateTime(shopBo.dob);
                sqlHelper.AddParameter(command, "@WeddingDate", shopBo.weddingDate, ParameterDirection.Input);
            }
            catch
            {
            }
            sqlHelper.AddParameter(command, "@Qualifications", shopBo.qualifications, ParameterDirection.Input);

            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#13
0
 public int UpdateSampleRequest(SampleBO samplRequestBO)
 {
     try
     {
         DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(samplRequestBO.ConString);
         SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);
         command.CommandText = "uspUpdateSample";
         sqlHelper.AddParameter(command, "@UserId", samplRequestBO.UserId, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ShopId", samplRequestBO.ShopId, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ProductData", samplRequestBO.ProductData, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@RequestedQty", samplRequestBO.RequestedQty, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@DeliveredQty", samplRequestBO.DeliveredQty, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@latitude", samplRequestBO.Latitude, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@longitude", samplRequestBO.Longitude, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@processName", samplRequestBO.ProcessName, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@SubmissionDate", samplRequestBO.SubmissionDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@MobileTransactionDate", samplRequestBO.mobileTransactionDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@SyncDate", samplRequestBO.SyncDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@mobileReferenceNo", samplRequestBO.mobileReferenceNo, ParameterDirection.Input);
         return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
     }
     catch (Exception e)
     {
         string ex = e.Message;
     }
     return(0);
 }
示例#14
0
 public int UpdateDoctorContribution(DoctorContributionBO doctorContributionBO)
 {
     try
     {
         DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(doctorContributionBO.ConString);
         SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);
         command.CommandText = "uspUpdateContribution";
         sqlHelper.AddParameter(command, "@UserId", doctorContributionBO.UserId, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ShopId", doctorContributionBO.ShopId, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ProductData", doctorContributionBO.ProductData, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@Qty", doctorContributionBO.Qty, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ContributedBy", doctorContributionBO.ContributedBy, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@latitude", doctorContributionBO.Latitude, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@longitude", doctorContributionBO.Longitude, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@processName", doctorContributionBO.ProcessName, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@Date", doctorContributionBO.Date, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@MobileTransactionDate", doctorContributionBO.mobileTransactionDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@SyncDate", doctorContributionBO.SyncDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@mobileReferenceNo", doctorContributionBO.mobileReferenceNo, ParameterDirection.Input);
         return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
     }
     catch (Exception e)
     {
         string ex = e.Message;
     }
     return(0);
 }
示例#15
0
        internal int updatePjp(PjpBO pjpBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(pjpBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspUpdatePjp";
            sqlHelper.AddParameter(command, "@Mode", pjpBO.Mode, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@DateList", pjpBO.Date, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@RouteList", pjpBO.Routes, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileTransactionDate", pjpBO.MobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@RemarkList", pjpBO.Remarks, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@CommonRemarks", pjpBO.CommonRemarks, ParameterDirection.Input);
            if (pjpBO.Mode == "1")
            {
                sqlHelper.AddParameter(command, "@UserId", pjpBO.UserId, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@Status", pjpBO.Status, ParameterDirection.Input);
            }
            else
            {
                sqlHelper.AddParameter(command, "@UserIdList", pjpBO.UserIdList, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@StatusList", pjpBO.StatusList, ParameterDirection.Input);
                if (pjpBO.MobileSyncDate != "")
                {
                    sqlHelper.AddParameter(command, "@MobileSyncDate", pjpBO.MobileSyncDate, ParameterDirection.Input);
                }
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#16
0
 internal int UpdateVanStockRequest(StockBO stockBO)
 {
     try
     {
         DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(stockBO.ConString);
         SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);
         command.CommandText = "UpdateVanStockRequest";
         sqlHelper.AddParameter(command, "@UserId", stockBO.UserId, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@StoreId", stockBO.ShopId, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@StockStatus", 0, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ProductData", stockBO.ProductData, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@StockData", stockBO.StockData, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@UnitData", stockBO.UnitData, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@Latitude", stockBO.Latitude, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@Longitude", stockBO.Longitude, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@ProcessName", stockBO.ProcessName, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@MobileTransactionDate", stockBO.mobileTransactionDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@SyncDate", stockBO.SyncDate, ParameterDirection.Input);
         sqlHelper.AddParameter(command, "@GpsSource", stockBO.GpsSource, ParameterDirection.Input);
         if (stockBO.MobileReferenceNo != string.Empty)
         {
             sqlHelper.AddParameter(command, "@MobileReferenceNo", stockBO.MobileReferenceNo, ParameterDirection.Input);
         }
         return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
     }
     catch (Exception e)
     {
         string ex = e.Message;
     }
     return(0);
 }
示例#17
0
        internal int UpdateComplaint(ComplaintEntryBO complaintEntyryBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(complaintEntyryBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspComplain";
            sqlHelper.AddParameter(command, "@Mode", "2", ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ShopId", complaintEntyryBO.ShopId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", complaintEntyryBO.ReportedBy, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@Remarks", complaintEntyryBO.Complaint, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ComplaintId", complaintEntyryBO.ComplaintId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", complaintEntyryBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", complaintEntyryBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", complaintEntyryBO.ProcessName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobileTransactionDate", complaintEntyryBO.mobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@mobRefNo", complaintEntyryBO.mobileReferenceNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", complaintEntyryBO.GpsSource, ParameterDirection.Input);

            if (complaintEntyryBO.MobileSyncDate != "" && complaintEntyryBO.MobileDate != "")
            {
                sqlHelper.AddParameter(command, "@MobileSyncDate", complaintEntyryBO.mobileDate, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@ServerSyncDate", complaintEntyryBO.mobileSyncDate, ParameterDirection.Input);
            }
            if (complaintEntyryBO.signalStrength != null && complaintEntyryBO.signalStrength != string.Empty && complaintEntyryBO.signalStrength != "")
            {
                sqlHelper.AddParameter(command, "@signalStrength", complaintEntyryBO.signalStrength, ParameterDirection.Input);
            }
            if (complaintEntyryBO.networkProvider != null && complaintEntyryBO.networkProvider != string.Empty && complaintEntyryBO.networkProvider != "")
            {
                sqlHelper.AddParameter(command, "@networkProvider", complaintEntyryBO.networkProvider, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#18
0
        internal void deleteData(ProductTransactionBO productTransactionalBO)
        {
            DataAccessSqlHelper dataAccesshelper = new DataAccessSqlHelper(productTransactionalBO.ConString);
            SqlCommand          command          = dataAccesshelper.CreateCommand(CommandType.Text);

            command.CommandText = "Delete from ProductTransaction";
            dataAccesshelper.ExecuteNonQuery(command);
        }
示例#19
0
        internal int UpdateLogsForMaterialDelivery(MaterialTransactionBO materialTransactionBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(materialTransactionBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspUpdateLog";
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#20
0
        public void InsertTransactionData(ExpenseBO expenseBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(expenseBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "InsertExpenseTransaction";
            sqlHelper.AddParameter(command, "@UserId", expenseBO.UserId, ParameterDirection.Input);
            sqlHelper.ExecuteNonQuery(command);
        }
示例#21
0
        internal int deleteAndInsertData(MaterialTransactionBO materialTransactionBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(materialTransactionBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "InsertMaterialTransaction";
            sqlHelper.AddParameter(command, "@UserId", materialTransactionBO.UserId, ParameterDirection.Input);
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#22
0
        internal int updateJointWorkingShopInDetails(JointWorkShopInAndOutBO jointWorkShopInAndOutBO)
        {
            try
            {
                DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(jointWorkShopInAndOutBO.ConString);
                SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);
                command.CommandText = "uspUpdateJointWorkingShopInAndOut";
                sqlHelper.AddParameter(command, "@Mode", "1", ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@UserId", jointWorkShopInAndOutBO.UserId, ParameterDirection.Input);

                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.ShopInId) && String.Compare(jointWorkShopInAndOutBO.ShopInId, "0") != 0)
                {
                    sqlHelper.AddParameter(command, "@ShopInId", jointWorkShopInAndOutBO.ShopInId, ParameterDirection.Input);
                }
                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.ShopInTime) && String.Compare(jointWorkShopInAndOutBO.ShopInTime, "1/1/1900 12:00:00 AM") != 0)
                {
                    sqlHelper.AddParameter(command, "@ShopInTime", jointWorkShopInAndOutBO.ShopInTime, ParameterDirection.Input);
                }
                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.ShopOutId) && String.Compare(jointWorkShopInAndOutBO.ShopOutId, "0") != 0)
                {
                    sqlHelper.AddParameter(command, "@ShopOutId", jointWorkShopInAndOutBO.ShopOutId, ParameterDirection.Input);
                }
                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.ShopOutTime) && String.Compare(jointWorkShopInAndOutBO.ShopOutTime, "1/1/1900 12:00:00 AM") != 0)
                {
                    sqlHelper.AddParameter(command, "@ShopOutTime", jointWorkShopInAndOutBO.ShopOutTime, ParameterDirection.Input);
                }
                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.JointWorkUserId))
                {
                    sqlHelper.AddParameter(command, "@JointWorkingUserId", jointWorkShopInAndOutBO.JointWorkUserId, ParameterDirection.Input);
                }

                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.BeatPlanDeviationReasionId) && String.Compare(jointWorkShopInAndOutBO.BeatPlanDeviationReasionId, "0") != 0)
                {
                    sqlHelper.AddParameter(command, "@BeatPlanDeviationReasonId", jointWorkShopInAndOutBO.BeatPlanDeviationReasionId, ParameterDirection.Input);
                }

                sqlHelper.AddParameter(command, "@MobileTransactionDate", jointWorkShopInAndOutBO.MobileTransactionDate, ParameterDirection.Input);
                sqlHelper.AddParameter(command, "@MobileRefNo", jointWorkShopInAndOutBO.MobileReferenceNo, ParameterDirection.Input);
                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.BeatPlanId))
                {
                    sqlHelper.AddParameter(command, "@BeatPlanId", jointWorkShopInAndOutBO.BeatPlanId, ParameterDirection.Input);
                }

                if (!String.IsNullOrEmpty(jointWorkShopInAndOutBO.MobileSyncDate))
                {
                    sqlHelper.AddParameter(command, "@MobileSyncDate", jointWorkShopInAndOutBO.MobileSyncDate, ParameterDirection.Input);
                }
                sqlHelper.AddParameter(command, "@ShopName", jointWorkShopInAndOutBO.ShopName, ParameterDirection.Input);

                return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#23
0
        internal void CancelOrders(CancelledOrdersBO cancelledOrdersBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(cancelledOrdersBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspCancelledOrderDetails";
            sqlHelper.AddParameter(command, "@Mode", "3", ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@OrderId", cancelledOrdersBO.orderIds, ParameterDirection.Input);
            sqlHelper.ExecuteNonQuery(command);
        }
示例#24
0
        internal int updateOrderStatus(RecentOrderBO recentOrderBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(recentOrderBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "UpdateOrderStatus";
            sqlHelper.AddParameter(command, "@OrderId", recentOrderBO.UpdateOrderId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@OrderStatus", recentOrderBO.Status, ParameterDirection.Input);
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#25
0
        internal int UpdateVanUnloadStatus(StockReconcilationBO stockReconcilationBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(stockReconcilationBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "UpdateVanUnloadStatus";
            sqlHelper.AddParameter(command, "@Id", stockReconcilationBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@StoreId", stockReconcilationBO.StoreId, ParameterDirection.Input);
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#26
0
        internal int UpdateDeviceToken(DeviceTokenBO deviceBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(deviceBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "InsertToDeviceToken";
            sqlHelper.AddParameter(command, "@userId", deviceBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@deviceToken", deviceBO.DeviceId, ParameterDirection.Input);
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#27
0
        internal string saveQuatation(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "QuotationEntry";
            sqlHelper.AddParameter(command, "@UserId", boObject.userId, ParameterDirection.Input);
            if (boObject.shopId != null && boObject.shopId.ToString() != string.Empty && boObject.shopId != 0)
            {
                sqlHelper.AddParameter(command, "@ShopID", boObject.shopId, ParameterDirection.Input);
            }

            sqlHelper.AddParameter(command, "@ProductData", boObject.productData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@QuantityData", boObject.quantityData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@RateData", boObject.rateData, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", boObject.lattitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", boObject.longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@processName", boObject.processName, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@TotalAmount", boObject.totalAmount, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@EmailAddress", boObject.emailAddress, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileTransactionDate", boObject.mobileTransactionDate, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobRefNo", boObject.mobRefNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@TempShopId", boObject.TempShopId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", boObject.GpsSource, ParameterDirection.Input);
            if (!boObject.SyncDate.Equals(string.Empty))
            {
                sqlHelper.AddParameter(command, "@SyncDate", boObject.SyncDate, ParameterDirection.Input);
            }
            if (boObject.mobileDate != null && !boObject.MobileSyncDate.Equals(string.Empty))
            {
                sqlHelper.AddParameter(command, "@mobileSyncDate", boObject.MobileSyncDate, ParameterDirection.Input);
            }
            if (boObject.mobileDate != null && boObject.mobileDate != string.Empty && boObject.mobileDate != "")
            {
                sqlHelper.AddParameter(command, "@mobileSyncDate", boObject.mobileDate, ParameterDirection.Input);
            }
            if (boObject.signalStrength != null && boObject.signalStrength != string.Empty && boObject.signalStrength != "")
            {
                sqlHelper.AddParameter(command, "@signalStrength", boObject.signalStrength, ParameterDirection.Input);
            }
            if (boObject.networkProvider != null && boObject.networkProvider != string.Empty && boObject.networkProvider != "")
            {
                sqlHelper.AddParameter(command, "@networkProvider", boObject.networkProvider, ParameterDirection.Input);
            }
            SqlParameter outparam = command.Parameters.Add("@quotationNo", SqlDbType.VarChar);

            outparam.Size      = 50;
            outparam.Direction = ParameterDirection.Output;
            sqlHelper.ExecuteNonQuery(command);
            string result = command.Parameters["@quotationNo"].Value.ToString();

            //Convert.ToInt32(sqlHelper.ExecuteScalar(command));
            //var result = returnParameter.Value;
            return(result);
        }
示例#28
0
        internal int UpdateImei(ImeiBO imeiBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(imeiBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspImeiLog";
            sqlHelper.AddParameter(command, "@userId", imeiBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@imeiNo", imeiBO.Imei, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@androidVersionNo", imeiBO.AndroidVersion, ParameterDirection.Input);
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }
示例#29
0
        internal void BackUpSqlite(SqliteBackUpBo sqliteBackUpbo)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(sqliteBackUpbo.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspWSSqliteBackup";
            sqlHelper.AddParameter(command, "@UserId", sqliteBackUpbo.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@SqlitePath", sqliteBackUpbo.SqlitePath, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileArchiveDate", sqliteBackUpbo.mobileDate, ParameterDirection.Input);
            sqlHelper.ExecuteNonQuery(command);
        }
示例#30
0
        internal int UpdateVersionLog(VersionLogBO versionLogBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(versionLogBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspVersionLog";
            sqlHelper.AddParameter(command, "@userId", versionLogBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@versionNo", versionLogBO.VersionNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@buildNo", versionLogBO.BuildNo, ParameterDirection.Input);
            return(Convert.ToInt32(sqlHelper.ExecuteNonQuery(command)));
        }