protected void GetDocuments(int AgentId)
        {
            AgentDocumentstbl Agd = new AgentDocumentstbl();

            Agd.AgentId = AgentId;
            List <AgentDocumentstbl> lgd = new List <AgentDocumentstbl>();

            lgd = objagBL.GetAgentDocuAgentID(Agd).ToList();
            int            ind = 1;
            LiteralControl lc  = new LiteralControl();

            foreach (var el in lgd)
            {
                lc.Text += "<div class='form-group row'>" +
                           "<div class='col-md-6 col-lg-6 col-sm-12 col-xs-12'>" +
                           "<asp:Label ID = 'lblSNo' class='control-label col-md-1' runat='server' Text='Document Name'><span style = 'font-size:18px;' > " + ind + ". </span>" +
                           "</asp:Label>" +
                           "<asp:Label ID = 'lblDName' class='control-label col-md-4' runat='server' Text='Document Name'><span style = 'font-size:18px;' > " + el.DocumentName + " </span>" +
                           "</asp:Label>" +
                           "<div class='col-md-6'>" +
                           "<a href='../Files/AgentDocuments/" + el.FileName + "' class='btn btn-success' download>Download</a>" +

                           "</div>" +
                           "</div>" +
                           "</div>";
                ind++;
                mydoc.Controls.Add(lc);
            }
        }
Example #2
0
        protected void InsertDoc(int ind)
        {
            AgentDocumentstbl ad = new AgentDocumentstbl();

            ad.AgentId      = Convert.ToInt32(hdnAgentID.Value);
            ad.DocumentName = txtDocumentName0.Text;
            ad.FileName     = UploadDoc0.FileName;
            ad.IsActive     = 1;
            ad.CreatedBy    = 1;
            ad.CreatedDate  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            lstdoc          = objRegBL.InsertAgentDocu(ad).ToList();


            //AgentDocumentstbl ad1 = new AgentDocumentstbl();
            //ad1.AgentId = Convert.ToInt32(hdnAgentID.Value);
            //ad1.DocumentName = txtDocumentName0.Text;
            //ad1.FileName = UploadDoc0.FileName;
            //ad1.IsActive = 1;
            //ad1.CreatedBy = 1;
            //ad1.CreatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            //lstdoc = objRegBL.InsertAgentDocu(ad1).ToList();
        }
 public IEnumerable <AgentDocumentstbl> GetAgentDocuAgentID(AgentDocumentstbl at)
 {
     return(objRegistrationDA.AgentsDocument(9, at));
 }
 public IEnumerable <AgentDocumentstbl> UpdateAgentsDocuIsActiveByAgentID(AgentDocumentstbl at)
 {
     return(objRegistrationDA.AgentsDocument(17, at));
 }
 public IEnumerable <AgentDocumentstbl> DeleteAgentDocu(AgentDocumentstbl ad)
 {
     return(objRegistrationDA.AgentsDocument(15, ad));
 }
 public IEnumerable <AgentDocumentstbl> InsertAgentDocu(AgentDocumentstbl ad)
 {
     return(objRegistrationDA.AgentsDocument(3, ad));
 }
 public IEnumerable <AgentDocumentstbl> GetAgentDocuByID(AgentDocumentstbl ad)
 {
     return(objRegistrationDA.AgentsDocument(12, ad));
 }