コード例 #1
0
        private void updateBatchSummary()
        {
            DataSet dsResult = new DataSet();

            objAttachList           = new FlexAttachementList();
            objAttachList.AttachID  = AttachId;
            objAttachList.AttachFor = "INV";
            //objAttachList.BatchReferenceID = strBatchId;
            //if (intTotalNoOfRecords > 0)
            //    intTotalNoOfRecords = intTotalNoOfRecords - 1;
            objAttachList.TotalNoOfRecords  = intTotalNoOfRecords;
            objAttachList.SuccessfulRecords = intTotalNoOfRecords - intInValidRecCnt;
            objAttachList.FailedRecords     = intInValidRecCnt;
            string status = string.Empty;

            if (intTotalNoOfRecords == intValidRecCnt && intTotalNoOfRecords > 0)
            {
                status = "COMP";
            }
            if (intValidRecCnt == 0)
            {
                status = "FAIL";
            }
            //else
            //    status = "PCOMP";
            objAttachList.Status = status;
            objExportMan         = new ExportManager();
            dsResult             = objExportMan.updateAttachementList(objAttachList);
        }
コード例 #2
0
        private void changeStatus(string strStaus)
        {
            DataSet dsResult = new DataSet();

            objAttachList           = new FlexAttachementList();
            objAttachList.AttachID  = AttachId;
            objAttachList.AttachFor = "INV";
            objAttachList.Status    = strStaus;
            objExportMan            = new ExportManager();
            dsResult = objExportMan.updateAttachementList(objAttachList);
        }
コード例 #3
0
 public DataSet getFlexUploadDetail(FlexAttachementList clsFlex, string fromDate, string toDate)
 {
     object[] parameter = new object[4] {
         clsFlex.AttachID,
         clsFlex.AttachFor,
         fromDate,
         toDate
     };
     DataAccessDs = new DataAccess();
     return(DataAccessDs.LoadDataSet(parameter, "P_TM_FlexAttachment_List_Select", "TM_FlexAttachment_List_Select"));
 }
コード例 #4
0
 public DataSet saveFlexUploadDetail(FlexAttachementList clsFlex)
 {
     object[] parameter = new object[7] {
         clsFlex.AttachID,
         clsFlex.AttachInternalFileName,
         clsFlex.AttachDisplayFileName,
         clsFlex.AttachFileDesc,
         clsFlex.AttachFor,
         clsFlex.FileType,
         clsFlex.User
     };
     DataAccessDs = new DataAccess();
     return(DataAccessDs.LoadDataSet(parameter, "P_TM_FlexAttachment_List_InsertUpdate", "TM_FlexAttachment_List"));
 }
コード例 #5
0
 public DataSet updateAttachementList(FlexAttachementList objAttachement)
 {
     object[] parameter = new object[7] {
         objAttachement.BatchReferenceID,
         objAttachement.AttachID,
         objAttachement.AttachFor,
         objAttachement.TotalNoOfRecords,
         objAttachement.SuccessfulRecords,
         objAttachement.FailedRecords,
         objAttachement.Status
     };
     DataAccessDs = new DataAccess();
     return(DataAccessDs.LoadDataSet(parameter, "P_TM_FlexAttachment_List_Update", "P_TM_FlexAttachment_List_Update"));
 }
コード例 #6
0
 public DataSet ReuploadFlexDetail(FlexAttachementList clsFlex)
 {
     object[] parameter = new object[8] {
         clsFlex.AttachID,
         clsFlex.AttachInternalFileName,
         clsFlex.AttachDisplayFileName,
         clsFlex.AttachFileDesc,
         clsFlex.AttachFor,
         clsFlex.FileType,
         clsFlex.User,
         clsFlex.BatchReferenceID
     };
     DataAccessDs = new DataAccess();
     return(DataAccessDs.LoadDataSet(parameter, "P_TM_FlexAttachment_List_Reupload", "TM_FlexAttachment_List"));
 }
コード例 #7
0
        public void SaveToDB(string fileName)
        {
            objFlex          = new FlexAttachementList();
            objFlex.AttachID = Convert.ToInt32("0");
            string InternalFileName = fileName.Substring(0, fileName.Length - 4) + System.DateTime.Now.ToString().Trim().Replace(" ", "").Replace("/", "_").Replace(":", "_") + ".csv";

            //objFlex.AttachInternalFileName = InternalFileName; //Guid.NewGuid().ToString();
            objFlex.AttachInternalFileName = fileName; //Guid.NewGuid().ToString();
            objFlex.AttachDisplayFileName  = fileName; //+ ".csv"; //Convert.ToString(ViewState["AttachFor"]) + btnFileUpload.FileName;
            objFlex.AttachFileDesc         = "";
            //objFlex.AttachFor = Convert.ToString(ViewState["AttachFor"]);
            objFlex.AttachFor = "INV";
            objFlex.User      = "******";
            objExpManager     = new ExportManager();
            DataSet dsResult = new DataSet();

            dsResult = objExpManager.saveFlexUploadDetail(objFlex);
            if (dsResult.Tables[0].Rows.Count > 0)
            {
                //lblMessage.Text = dsResult.Tables[0].Rows[0]["Result"].ToString();
                //hidAttachId.Value = dsResult.Tables[0].Rows[0]["Attach_ID"].ToString();
            }
        }