public ActionResult Form_signing(string appNo)
        {
            NewCode         newCode    = new NewCode();
            FORM_IT_01Model fORM_IT_01 = newCode.getDataToModel(appNo);


            return(View(fORM_IT_01));
        }
        public ActionResult EditApp(ApprovalApp approvals, string ApprovalButton)
        {
            var subM    = new Submit();
            var newCode = new NewCode();

            switch (ApprovalButton)
            {
            case "Approval":
            {
                //string no1 = approvals.NoteApproval;
                //string no3 = approvals.EmpModels.APPNO;

                //subM.checkStateApp("Approval", no3, no1);

                bool kqNow = subM.SigningApp(approvals.EmpModels.APPNO, "ok");
                //string no2 = "Reject";
                break;
            }

            case "Reject":
            {
                //string no1 = approvals.NoteApproval;
                //string no3 = approvals.EmpModels.APPNO;

                //subM.checkStateApp("Reject", no3, no1);
                //string no2 = "Reject";
                newCode.getDataToModel("20200731094049");
                break;
            }

            case "Submit":
            {
                //var files = Request.Files["file"];
                //string no3 = approvals.EmpModels.APPNO;
                //string no1 = approvals.NoteApproval;
                //if (files != null)
                //{
                //    subM.checkStateApp("Submit", no3, no1);
                //    String FileExt = Path.GetExtension(files.FileName).ToUpper();
                //    if (FileExt == ".PDF" || FileExt == ".XLSX" || FileExt == ".XLS")
                //    {

                //        string _fileName = approvals.EmpModels.APPNO + Path.GetFileName(files.FileName);

                //        String filePath = "/UploadFiles/" + _fileName;
                //        string _path = Path.Combine(Server.MapPath("~/UploadFiles"), _fileName);
                //        //Stream str = files.InputStream;
                //        //BinaryReader Br = new BinaryReader(str);
                //        //Byte[] FileDet = Br.ReadBytes((Int32)str.Length);
                //        //files.SaveAs(MapPath(filePath));
                //        files.SaveAs(_path);
                //        //files.SaveAs(MapPath)
                //        approvals.EmpModels.FileName = files.FileName;
                //        approvals.EmpModels.Username = filePath;
                //        //appEmp.TIMECREATE = DateTime.Now;
                //        //CreateApplication(appEmp);
                //        var session = (UserLogin)Session[CommonConstants.USER_SESSION];
                //        var signList = newCode.getListManager(session.UserID.Trim());
                //        string[] signemp = signList.Split(';');
                //        string signemp1 = signemp[0];
                //        string signemp2 = signemp[1];
                //        var signname11 = newCode.getNameEmp(signemp1);
                //        var signname22 = newCode.getNameEmp(signemp2);
                //        approvals.EmpModels.APPSTATES = "020";
                //        approvals.EmpModels.Signer1No = signemp1;
                //        approvals.EmpModels.Signer1Name = signname11;
                //        approvals.EmpModels.Checkwait = approvals.EmpModels.Signer1No;
                //        approvals.EmpModels.CHECKWAITNAME = approvals.EmpModels.Signer1Name;
                //        approvals.EmpModels.APPSTATUS = "Waiting...";


                //        approvals.EmpModels.Signer2No = signemp2;
                //        approvals.EmpModels.Signer2Name = signname22;
                //        newCode.UpdatenewAppFormIT02(approvals, no3);
                //        break;
                //    }
                //    else
                //    {
                //        //ViewBag.FileStatus = "Invalid file format!";
                //        SetAlert("Invalid file format!", "danger");
                //        return View();
                //    }
                //}
                //else
                //{

                //    //string no3 = approvals.EmpModels.APPNO;

                //    subM.checkStateApp("Submit", no3, no1);
                //    var session = (UserLogin)Session[CommonConstants.USER_SESSION];
                //    var signList = newCode.getListManager(session.UserID.Trim());
                //    string[] signemp = signList.Split(';');
                //    string signemp1 = signemp[0];
                //    string signemp2 = signemp[1];
                //    var signname11 = newCode.getNameEmp(signemp1);
                //    var signname22 = newCode.getNameEmp(signemp2);
                //    approvals.EmpModels.APPSTATES = "020";
                //    approvals.EmpModels.Signer1No = signemp1;
                //    approvals.EmpModels.Signer1Name = signname11;
                //    approvals.EmpModels.Checkwait = approvals.EmpModels.Signer1No;
                //    approvals.EmpModels.CHECKWAITNAME = approvals.EmpModels.Signer1Name;
                //    approvals.EmpModels.APPSTATUS = "Waiting...";


                //    approvals.EmpModels.Signer2No = signemp2;
                //    approvals.EmpModels.Signer2Name = signname22;

                //    newCode.Update1newAppFormIT02(approvals, no3);

                break;
                //}
            }
            }
            if (ApprovalButton == "Approval")
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }