public void LoadBodyFromDartaaChalaani(int orgID, string regDate, int regNo)
 {
     try
     {
         List <ATTDartaaChalaani> lst = BLLDartaaChalaani.GetDartaaChalaaniByIDs(orgID, regDate, regNo);
         if (lst.Count == 1)
         {
             this.txtNote.Text = lst[0].Description;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
    public void LoadAttachmentFromDartaaChalaani(int orgID, string regDate, int regNo)
    {
        try
        {
            List <ATTDartaaChalaani>           dlist = BLLDartaaChalaani.GetDartaaChalaaniByIDs(orgID, regDate, regNo);
            List <ATTGeneralTippaniAttachment> lst   = new List <ATTGeneralTippaniAttachment>();
            foreach (ATTDartaaChalaani att in dlist)
            {
                if (att.FileName != "" && att.RegFile != null)
                {
                    ATTGeneralTippaniAttachment ah = new ATTGeneralTippaniAttachment();
                    ah.OrgID            = 0;
                    ah.TippaniID        = 0;
                    ah.TippaniProcessID = 0;
                    ah.AttachmentID     = 0;
                    ah.DocumentName     = att.FileName;
                    ah.Description      = "";
                    ah.RawContent       = att.RegFile;
                    ah.Action           = "A";
                    lst.Add(ah);
                }
            }

            foreach (ATTDartaaChalaani attach in dlist)
            {
                if (attach.RegFile != null)
                {
                    GC.Collect();
                    GC.SuppressFinalize(attach.RegFile);
                    attach.RegFile = null;
                }
            }

            this.grdAttachment.DataSource = lst;
            this.grdAttachment.DataBind();
            Session["Tippani_Attachment"] = lst;
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }