internal int UnflagExportedRecords(ReExportDataEntity objReExport)
        {
            int count = 0;

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.UnflagExportedRecords";
                sproc.StoredProceduresParameter.Add(GetParam("@CountryGroupId", objReExport.CountryGroupId.ToString(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@Tag", string.IsNullOrEmpty(objReExport.Tags) ? null : objReExport.Tags.ToString(), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@ImportProcess", string.IsNullOrEmpty(objReExport.ImportProcess) ? null : objReExport.ImportProcess.ToString(), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@SrcRecordId", string.IsNullOrEmpty(objReExport.SrcRecordId) ? null : objReExport.SrcRecordId.ToString(), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@SrcRecordIdList", string.IsNullOrEmpty(objReExport.SrcRecordIdList) ? null : objReExport.SrcRecordIdList.ToString(), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@RecordType", objReExport.Recordtype.ToString(), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@UserId", objReExport.UserId.ToString(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@GetCountsOnly", objReExport.GetCountsOnly.ToString(), SQLServerDatatype.BitDataType));

                if (objReExport.GetCountsOnly == false)
                {
                    sql.ExecuteNoReturn(CommandType.StoredProcedure, sproc);
                }
                else
                {
                    count = (Int32)sql.ExecuteScalar(CommandType.StoredProcedure, sproc);
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(count);
        }
예제 #2
0
        public ActionResult ReExportFile(ReExportDataEntity objReExport)
        {
            //mark as Unflag data for ReExport data
            int count = 0;
            ExportJobSettingsFacade efac = new ExportJobSettingsFacade(this.CurrentClient.ApplicationDBConnectionString);

            objReExport.UserId = Helper.oUser.UserId;
            count = efac.UnflagExportedRecords(objReExport);
            if (objReExport.GetCountsOnly)
            {
                return(new JsonResult {
                    Data = CommonMessagesLang.msgTotal + " " + count + " " + CommonMessagesLang.msgRecordsAffected + " "
                });
            }
            else
            {
                //set helper for display un-flag export button
                CompanyFacade fac = new CompanyFacade(this.CurrentClient.ApplicationDBConnectionString, Helper.oUser.UserName);
                DataTable     dtActiveDataStatistics = fac.GetDashboardGetDataQueueStatistics(Helper.oUser != null ? Helper.oUser.LOBTag : null, Helper.oUser != null ? Helper.oUser.Tags : null, Helper.oUser.UserId);
                if (dtActiveDataStatistics.Rows.Count != 0)
                {
                    Helper.ArchivalQueueCount = dtActiveDataStatistics.Rows[0]["ArchivalQueueCount"] is DBNull ? 0 : Convert.ToInt32(dtActiveDataStatistics.Rows[0]["ArchivalQueueCount"]);
                }
                return(new JsonResult {
                    Data = ExportLang.msgUnFlagData
                });
            }
        }
예제 #3
0
 public int UnflagExportedRecords(ReExportDataEntity objReExport)
 {
     return(rep.UnflagExportedRecords(objReExport));
 }