protected void btndel_click(object sender, EventArgs e)
        {
            string value = hfdinsid.Value;
            tbl_Person_Document_Detail obj = new tbl_Person_Document_Detail();

            obj.Document_ID = Convert.ToInt32(value);
            Person_Details.Licensing_Details.DeleteDocument(obj);
            altbox("Record deleted successfully.");
            hfdinsid.Value = "0";
        }
        protected void btndel_click(object sender, EventArgs e)
        {
            string value = hfdselid.Value;
            tbl_Person_Document_Detail obj = new tbl_Person_Document_Detail();

            obj.Document_ID = Convert.ToInt32(value);
            Person_Details.Licensing_Details.DeleteDocument(obj);
            altbox("Record deleted successfully.");
            Page.RegisterStartupScript("js", "<script>sa5.process();</script>");
        }
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            string filename = "";

            if (hfddocid.Value == "0")
            {
                if (upddocument.HasFile)
                {
                    filename = upddocument.PostedFile.FileName;
                }
                string approval = "";
                if (chk_approval.Checked == true)
                {
                    approval = "true";
                }
                else
                {
                    approval = "false";
                }
                tbl_Person_Document_Detail pdd = new tbl_Person_Document_Detail();
                pdd.Document_ID = Convert.ToInt32(hfddocid.Value);
                string guid = Guid.NewGuid().ToString().Replace("-", string.Empty);
                guid = guid + DateTime.Now.ToShortDateString().Replace("/", string.Empty).Replace(":", string.Empty);
                string fext = Path.GetExtension(upddocument.PostedFile.FileName);
                if (upddocument.HasFile)
                {
                    string url = System.Configuration.ConfigurationManager.AppSettings["lmsdoclink"].ToString() + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
                    pdd.docpath = url + guid + fext;
                }
                pdd.Person_ID       = Convert.ToInt32(hfdpid.Value);
                pdd.Cabinet_ID      = Convert.ToInt32(ddl_cabinet.SelectedValue);
                pdd.Folder_ID       = Convert.ToInt32(ddl_folder.SelectedValue);
                pdd.Document_Date   = Convert.ToDateTime(txt_date.Text);
                pdd.DocType         = Convert.ToInt32(ddl_doctype.SelectedValue);
                pdd.Description     = filename;
                pdd.Approval_Needed = Convert.ToBoolean(approval);
                pdd.Modified_By     = Convert.ToInt32(Session["UID"].ToString());
                pdd.Modified_Date   = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                int docid = Person_Details.Licensing_Details.InsertDocument(pdd);
                if (upddocument.HasFile)
                {
                    if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString()))
                    {
                        Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString());
                    }
                    if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString()))
                    {
                        Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString());
                    }

                    upddocument.SaveAs(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString() + "\\" + guid + fext);
                }
                altbox("Record inserted successfully.");
            }
        }
Ejemplo n.º 4
0
        protected void btnedit_click(object sender, EventArgs e)
        {
            string value = hfdselid.Value;
            tbl_Person_Document_Detail pdd = PersonLicensing.Utilities_Licensing.EditDocument(Convert.ToInt32(value));

            hfdselid.Value = pdd.Document_ID.ToString();
            txt_com.Text   = pdd.Comments;


            string js = "Popup();";

            ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true);
        }
        protected void btnedit_click(object sender, EventArgs e)
        {
            string value = hfdselid.Value;
            tbl_Person_Document_Detail pdd = Utilities_Licensing.EditDocument(Convert.ToInt32(value));

            hfddocid.Value = pdd.Document_ID.ToString();
            txt_com.Text   = pdd.Comments;
            if (ddl_lictypeedit.Items.FindByValue(pdd.License_Type.ToString()) != null)
            {
                ddl_lictypeedit.Items.FindByValue(pdd.License_Type.ToString()).Selected = true;
            }
            if (ddldoctypeedit.Items.FindByValue(pdd.DocType.ToString()) != null)
            {
                ddldoctypeedit.Items.FindByValue(pdd.DocType.ToString()).Selected = true;
            }
            string js = "Popup();";

            ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true);
        }
Ejemplo n.º 6
0
        protected void btnsendoc_click(object sender, EventArgs e)
        {
            string approval = "";
            
                approval = "false";
            tbl_Person_Document_Detail pdd = new tbl_Person_Document_Detail();
           
                pdd.Person_ID = Convert.ToInt32(Request.QueryString[1].ToString());
                pdd.cmpd = Convert.ToInt32(Request.QueryString[0].ToString());

           
            string guid = Guid.NewGuid().ToString().Replace("-", string.Empty);
            guid = guid + DateTime.Now.ToShortDateString().Replace("/", string.Empty).Replace(":", string.Empty);
            string fext = ".pdf";
            if (txtcomplaint.Text != "")
            {

                string url = System.Configuration.ConfigurationManager.AppSettings["lmsdoclink"].ToString() + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
                pdd.docpath = url + guid + fext;
            }
            pdd.Cabinet_ID =1071;
            pdd.Folder_ID =1089;
            pdd.Document_Date = DateTime.Now;
            pdd.DocType =1142;
            pdd.Description = "Investigation Report";
            pdd.Comments = "";
            pdd.Approval_Needed = Convert.ToBoolean(approval);
            pdd.Modified_By = Convert.ToInt32(Session["UID"].ToString());
            pdd.Modified_Date = Convert.ToDateTime(DateTime.Now.ToShortDateString());
            int docid = Person_Details.Licensing_Details.InsertDocument(pdd);
            if (txtcomplaint.Text != "")
            {
                if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString()))
                    Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString());
                if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString()))
                    Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString());

                var ilink = System.Configuration.ConfigurationManager.AppSettings["lmslink"].ToString();
                Genratepdftext(txtcomplaint.Text.Replace("../Prints", ilink+"/Prints"), System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString() + "\\" + guid + fext);
            }
             altbox("Document Uploaded successfully.");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string rnd  = Guid.NewGuid().ToString().Replace("-", string.Empty);
                string path = Server.MapPath("Person_Document") + "//" + rnd + ".pdf";
                tbl_Person_Document_Detail pdd = new tbl_Person_Document_Detail();
                pdd.Document_ID     = 0;
                pdd.Person_ID       = Convert.ToInt32(Request.QueryString["pid"].ToString());
                pdd.Cabinet_ID      = Convert.ToInt32(Request.QueryString["cabid"].ToString());
                pdd.Folder_ID       = Convert.ToInt32(Request.QueryString["fldid"].ToString());
                pdd.Document_Date   = DateTime.Now;
                pdd.DocType         = Convert.ToInt32(Request.QueryString["doctype"].ToString());
                pdd.Description     = Request.QueryString["docdesc"].ToString();
                pdd.docpath         = System.Configuration.ConfigurationManager.AppSettings["lmsdoclink"].ToString() + rnd + ".pdf";
                pdd.Approval_Needed = Convert.ToBoolean(1);
                pdd.Modified_By     = Convert.ToInt32("-1");
                pdd.Modified_Date   = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                int docid = Person_Details.Licensing_Details.InsertDocument(pdd);

                Transcript_Request(System.Configuration.ConfigurationManager.AppSettings["onlinetechnicianrenewal"].ToString() + "?ordid=" + Request.QueryString["ordid"].ToString() + "&noprint=0", path);
            }
        }
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            string filename = "";

            if (hfddocid.Value == "0")
            {
                if (upddocument.HasFile)
                {
                    filename = upddocument.PostedFile.FileName;
                }


                tbl_Person_Document_Detail pdd = new tbl_Person_Document_Detail();
                pdd.Document_ID = Convert.ToInt32(hfddocid.Value);
                if (hfdutype.Value == "1")
                {
                    pdd.Person_ID = Convert.ToInt32(hfdperid.Value);
                }
                else
                {
                    pdd.Person_ID = Convert.ToInt32(Request.QueryString[1].ToString());
                    pdd.cmpd      = Convert.ToInt32(hfdperid.Value);
                }
                string guid = Guid.NewGuid().ToString().Replace("-", string.Empty);
                guid = guid + DateTime.Now.ToShortDateString().Replace("/", string.Empty).Replace(":", string.Empty);
                string fext = Path.GetExtension(upddocument.PostedFile.FileName);
                if (upddocument.HasFile)
                {
                    string url = System.Configuration.ConfigurationManager.AppSettings["lmsdoclink"].ToString() + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
                    pdd.docpath = url + guid + fext;
                }
                pdd.Cabinet_ID    = Convert.ToInt32(ddl_cabinet.SelectedValue);
                pdd.Folder_ID     = Convert.ToInt32(ddl_folder.SelectedValue);
                pdd.Document_Date = Convert.ToDateTime(txt_date.Text);
                pdd.DocType       = Convert.ToInt32(ddl_doctype.SelectedValue);
                pdd.Description   = filename;
                pdd.License_Type  = Convert.ToInt32(ddl_licensetype.SelectedValue);
                pdd.Comments      = txtdoccomments.Text;

                pdd.Renewal_Year  = ddl_year.SelectedValue;
                pdd.Modified_By   = Convert.ToInt32(Session["UID"].ToString());
                pdd.Modified_Date = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                int docid = Person_Details.Licensing_Details.InsertDocument(pdd);
                if (upddocument.HasFile)
                {
                    if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString()))
                    {
                        Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString());
                    }
                    if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString()))
                    {
                        Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString());
                    }

                    upddocument.SaveAs(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString() + "\\" + guid + fext);
                }
                if (hfdutype.Value == "1" && ddl_doctype.SelectedValue == "1389")
                {
                    List <USP_GetLicandCmpDetailsResult> obj = Person_Details.Licensing_Details.GetLicandCmpDetails(Request.QueryString[0].ToString(), docid, ddl_licensetype.SelectedValue, 0);
                    if (obj.Count > 0)
                    {
                        Mail.SendMail("", "*****@*****.**", "", "Supportive Documents Upload", "Uploaded By : " + obj[0].UploadedBy + "<br/>Licensee’s Name : " + obj[0].Full_Name + "<br/>Case # : " + obj[0].Case_No + "<br/>License # : " + obj[0].Lic_No);
                    }
                }
                else if (hfdutype.Value == "2" && ddl_doctype.SelectedValue == "1390")
                {
                    List <USP_GetLicandCmpDetailsResult> obj = Person_Details.Licensing_Details.GetLicandCmpDetails(Request.QueryString[1].ToString(), docid, ddl_licensetype.SelectedValue, Convert.ToInt32(Request.QueryString[0].ToString()));
                    if (obj.Count > 0)
                    {
                        Mail.SendMail("", "*****@*****.**", "", "Supportive Documents Upload", "Uploaded By : " + obj[0].UploadedBy + "<br/>Licensee’s Name : " + obj[0].Full_Name + "<br/>Case # : " + obj[0].Case_No + "<br/>License # : " + obj[0].Lic_No);
                    }
                }
                altbox("Record inserted successfully.");
                Clear();
            }
        }
Ejemplo n.º 9
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            string filename = "";

            if (hfdselid.Value == "0")
            {
                if (upddocument.HasFile)
                {
                    filename = upddocument.PostedFile.FileName;
                }
                string approval = "";
                if (chk_approval.Checked == true)
                {
                    approval = "true";
                }
                else
                {
                    approval = "false";
                }
                tbl_Person_Document_Detail pdd = new tbl_Person_Document_Detail();
                pdd.Document_ID = Convert.ToInt32(hfdselid.Value);
                pdd.Person_ID   = Convert.ToInt32(hfdperid.Value);
                pdd.cmpd        = Convert.ToInt32(hfdcmpid.Value);


                string guid = Guid.NewGuid().ToString().Replace("-", string.Empty);
                guid = guid + DateTime.Now.ToShortDateString().Replace("/", string.Empty).Replace(":", string.Empty);
                string fext = Path.GetExtension(upddocument.PostedFile.FileName);
                if (upddocument.HasFile)
                {
                    string url = System.Configuration.ConfigurationManager.AppSettings["lmsdoclink"].ToString() + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
                    pdd.docpath = url + guid + fext;
                }
                pdd.Cabinet_ID      = Convert.ToInt32(ddl_cabinet.SelectedValue);
                pdd.Folder_ID       = Convert.ToInt32(ddl_folder.SelectedValue);
                pdd.Document_Date   = Convert.ToDateTime(txt_date.Text);
                pdd.DocType         = Convert.ToInt32(ddl_doctype.SelectedValue);
                pdd.Description     = filename;
                pdd.CRCandHearing   = "5";
                pdd.Comments        = txtdoccomments.Text;
                pdd.Approval_Needed = Convert.ToBoolean(approval);
                pdd.Created_By      = Session["UID"].ToString();
                pdd.Created_Date    = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                int docid = Person_Details.Licensing_Details.InsertDocument(pdd);
                if (upddocument.HasFile)
                {
                    if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString()))
                    {
                        Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString());
                    }
                    if (!Directory.Exists(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString()))
                    {
                        Directory.CreateDirectory(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString());
                    }

                    upddocument.SaveAs(System.Configuration.ConfigurationManager.AppSettings["docpath"].ToString() + "\\" + DateTime.Now.Year.ToString() + "\\" + DateTime.Now.Month.ToString() + "\\" + guid + fext);
                }
                List <USP_GetLicandCmpDetailsResult> obj = Person_Details.Licensing_Details.GetLicandCmpDetails(Request.QueryString[1].ToString(), docid, "", Convert.ToInt32(Request.QueryString[0].ToString()));
                if (obj.Count > 0)
                {
                    if (ddl_doctype.SelectedValue == "1399")
                    {
                        Mail.SendMail("", "[email protected];[email protected];[email protected];[email protected];[email protected];[email protected];[email protected]", "", "Document Upload", "A new document has been Uploaded By : " + obj[0].CreatedBy + " For Licensee’s Name : " + obj[0].Full_Name + "<br/>Case # : " + obj[0].Case_No + "<br/>License # : " + obj[0].Lic_No + "<br/>Document Type :" + ddl_doctype.SelectedItem.Text + "<br/>Filename :" + upddocument.PostedFile.FileName);
                    }
                    else
                    {
                        Mail.SendMail("", "[email protected];[email protected];[email protected];[email protected];[email protected];[email protected];[email protected]", "", "Document Upload", "A new document has been Uploaded By : " + obj[0].CreatedBy + " For Licensee’s Name : " + obj[0].Full_Name + "<br/>Case # : " + obj[0].Case_No + "<br/>License # : " + obj[0].Lic_No + "<br/>Document Type :" + ddl_doctype.SelectedItem.Text + "<br/>Filename :" + upddocument.PostedFile.FileName);
                    }
                }
                altbox("Record inserted successfully.");
                Clear();
            }
        }