Esempio n. 1
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);
 }
Esempio n. 2
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);
 }
Esempio n. 3
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)));
        }
Esempio n. 4
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);
 }
Esempio n. 5
0
        public EditCustomerBO GetPendingApprovalsToReportingUser(EditCustomerBO editCustomerBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(editCustomerBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "[uspCustomerEditApproval]";
            sqlHelper.AddParameter(command, "@Mode", editCustomerBO.Mode, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", editCustomerBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@ShopId", editCustomerBO.ShopId, ParameterDirection.Input);
            DataSet ds   = sqlHelper.ExecuteDataSet(command);
            DataRow row  = ds.Tables[0].Rows[0];
            decimal temp = 0.0M;

            editCustomerBO.ShopName              = (row.Field <string>("ShopName") == null ? "" : row.Field <string>("ShopName"));
            editCustomerBO.ReportingUser         = (row.Field <string>("ReportingUser") == null ? "" : row.Field <string>("ReportingUser"));
            editCustomerBO.RequestedUser         = (row.Field <string>("RequestedUser") == null ? "" : row.Field <string>("RequestedUser"));
            editCustomerBO.UserEmail             = (row.Field <string>("ToUserEmail") == null ? "" : row.Field <string>("ToUserEmail"));
            editCustomerBO.ContactName           = (row.Field <string>("ContactPerson") == null ? "" : Convert.ToString(row.Field <string>("ContactPerson")));
            editCustomerBO.MobileNo              = (row.Field <string>("MobileNo") == null ? "" : Convert.ToString(row.Field <string>("MobileNo")));
            editCustomerBO.PinCode               = (row.Field <string>("PINCode") == null ? "" : Convert.ToString(row.Field <string>("PINCode")));
            editCustomerBO.Address               = (row.Field <string>("Address") == null ? "" : Convert.ToString(row.Field <string>("Address")));
            editCustomerBO.StreetName            = (row.Field <string>("StreetName") == null ? "" : Convert.ToString(row.Field <string>("StreetName")));
            editCustomerBO.ShopPotential         = (row.Field <decimal?>("ShopPotential") == null ? temp : Convert.ToDecimal(row.Field <decimal>("ShopPotential")));
            editCustomerBO.GstNumber             = (row.Field <string>("GSTIN") == null ? "" : Convert.ToString(row.Field <string>("GSTIN")));
            editCustomerBO.EditedContactName     = (row.Field <string>("ContactName") == null ? "" : Convert.ToString(row.Field <string>("ContactName")));
            editCustomerBO.EditedMobile          = (row.Field <string>("EditedMobile") == null ? "" : Convert.ToString(row.Field <string>("EditedMobile")));
            editCustomerBO.EditedPinCode         = (row.Field <string>("EditedPinCode") == null ? "" : Convert.ToString(row.Field <string>("EditedPinCode")));
            editCustomerBO.EditedAddress         = (row.Field <string>("EditedAddress") == null ? "" : Convert.ToString(row.Field <string>("EditedAddress")));
            editCustomerBO.Landmark              = (row.Field <string>("Landmark") == null ? "" : Convert.ToString(row.Field <string>("Landmark")));
            editCustomerBO.IsEditCustomerMailReq = (row.Field <bool?>("IsEditCustomerMailReq") == null ? false : Convert.ToBoolean(row.Field <bool>("IsEditCustomerMailReq")));
            editCustomerBO.EditedShopPotential   = (row.Field <decimal?>("EditedShopPotential") == null ? temp : Convert.ToDecimal(row.Field <decimal>("EditedShopPotential")));
            editCustomerBO.EditedGstNumber       = (row.Field <string>("EditedGstNumber") == null ? "" : Convert.ToString(row.Field <string>("EditedGstNumber")));
            return(editCustomerBO);
        }
Esempio n. 6
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)));
        }
Esempio n. 7
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)));
        }
Esempio n. 8
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)));
        }
Esempio n. 9
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)));
        }
Esempio n. 10
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)));
        }
Esempio n. 11
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)));
        }
Esempio n. 12
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)));
        }
Esempio n. 13
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));
        }
Esempio n. 14
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)));
        }
Esempio n. 15
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)));
        }
Esempio n. 16
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)));
        }
Esempio n. 17
0
        internal int UpdateBeatPlanDeviation(BeatPlanDeviationBO beatPlanDeviationBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(beatPlanDeviationBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspUpdateBeatPlanDeviation";
            sqlHelper.AddParameter(command, "@BeatPlanId", beatPlanDeviationBO.BeatPlanId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@UserId", beatPlanDeviationBO.UserId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@latitude", beatPlanDeviationBO.Latitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@longitude", beatPlanDeviationBO.Longitude, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileRefNo", beatPlanDeviationBO.MobileReferenceNo, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@GpsSource", beatPlanDeviationBO.source, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@DeviationReasonId", beatPlanDeviationBO.DeviationReasonId, ParameterDirection.Input);
            sqlHelper.AddParameter(command, "@MobileTransactionDate", beatPlanDeviationBO.MobileTransactionDate, ParameterDirection.Input);

            if (!string.IsNullOrEmpty(beatPlanDeviationBO.SyncDate))
            {
                sqlHelper.AddParameter(command, "@SyncDate", beatPlanDeviationBO.SyncDate, ParameterDirection.Input);
            }
            if (!string.IsNullOrEmpty(beatPlanDeviationBO.signalStrength))
            {
                sqlHelper.AddParameter(command, "@signalStrength", beatPlanDeviationBO.signalStrength, ParameterDirection.Input);
            }
            return(Convert.ToInt32(sqlHelper.ExecuteScalar(command)));
        }
Esempio n. 18
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)));
        }
Esempio n. 19
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)));
        }
Esempio n. 20
0
        internal string GetProcessName(SignatureBO signatureBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(signatureBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "select ProcessName from Process where ProcessId = " + signatureBO.ProcessId;
            return(Convert.ToString(sqlHelper.ExecuteScalar(command)));
        }
Esempio n. 21
0
        internal int getOrderCorrectionStatusId(ProcessStatusBO processStatusBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(processStatusBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT Status FROM ProcessStatus where StatusDescription = 'Withheld'";
            return(Convert.ToInt32(sqlHelper.ExecuteScalar(command)));
        }
Esempio n. 22
0
        internal string getHeaderNameForPDF(QuatationDetailsBO boObject, string productId)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "Select Classification from Classification where ClassificationId = (Select ClassificationId from ProductAttribute where ProductAttributeId = " + productId + ")";
            return(Convert.ToString(sqlHelper.ExecuteScalar(command)));
        }
Esempio n. 23
0
        internal SqlDataReader getUserDetails(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT u.name,u.address,ur.userRole from [user] u INNER JOIN UserRole ur ON u.userRoleId = ur.userRoleId where userId =" + boObject.userId;
            return(sqlHelper.ExecuteReader(command));
        }
Esempio n. 24
0
        internal SqlDataReader getNewCustomerDetails(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT CustomerName, address from NewCustomer where TempMShopId like  '" + boObject.TempShopId + "'";
            return(sqlHelper.ExecuteReader(command));
        }
Esempio n. 25
0
        internal int isCustomizedImageNeeded(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT status FROM MobilePrivilegeControls where ControlId = (select ControlId from MobileControl where ControlName like '%btnLogoForQuotationPDF%')";
            return(Convert.ToInt32(sqlHelper.ExecuteScalar(command)));
        }
Esempio n. 26
0
        internal SqlDataReader getShopDetails(QuatationDetailsBO boObject)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(boObject.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "SELECT name,address from shop where shopid = " + boObject.shopId;
            return(sqlHelper.ExecuteReader(command));
        }
Esempio n. 27
0
        public int getNewCustomerId(NewCustomerBO newCustomerBO, string id)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(newCustomerBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.Text);

            command.CommandText = "select NewCustomerId from NewCustomer where TempMShopId ='" + id + "'";
            return(Convert.ToInt32(sqlHelper.ExecuteScalar(command)));
        }
Esempio n. 28
0
        internal DataSet GetImagePath(PhotoCaptureBO photoCaptureBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(photoCaptureBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "getImagePath";
            return(sqlHelper.ExecuteDataSet(command));
        }
Esempio n. 29
0
        public DataSet GetModifiedDate(ApplicationSettingsBO objApplicationSettingsBO)
        {
            DataAccessSqlHelper sqlHelper = new DataAccessSqlHelper(objApplicationSettingsBO.ConString);
            SqlCommand          command   = sqlHelper.CreateCommand(CommandType.StoredProcedure);

            command.CommandText = "uspGetModifiedDate";
            return(sqlHelper.ExecuteDataSet(command));
        }
Esempio n. 30
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);
        }