public bool PostSignature([FromBody] User signatureData) { SignatureProcess sig = new SignatureProcess(); bool SignatureValidity = sig.GetSignature(signatureData.Path, signatureData.Id); return(SignatureValidity); }
public static void CheckPageReadOnly(Page myPage, string checkType, string loginUserID) { string category = WorkingAppraisee.AppraisalType; string area = WorkingAppraisee.AppraisalArea; string code = WorkingAppraisee.AppraisalCode; string pageFor = AppraisalProcess.AppraisalPageItem("PageActiveFor", myPage.User.Identity.Name, category, area, code); string pageRecover = AppraisalProcess.AppraisalPageItem("PageRecover", myPage.User.Identity.Name, category, area, code); string pageHelpe = AppraisalProcess.AppraisalPageItem("PageHelp", myPage.User.Identity.Name, category, area, code); string pageEP = AppraisalProcess.AppraisalPageItem("PageEP", myPage.User.Identity.Name, category, area, code); string AppraislRole = WorkingProfile.UserAppraisalRole; // AppraisalProcess.AppraisalActionRole(category, WorkingProfile.UserRole, WorkingAppraisee.UserID, User.Identity.Name); string SignOff = SignatureProcess.SignOffComplete(checkType, myPage.User.Identity.Name, WorkingAppraisee.AppraisalYear, WorkingAppraisee.AppraisalSchoolCode, WorkingAppraisee.EmployeeID, WorkingAppraisee.SessionID, category, area, WorkingProfile.UserRole); var hfSignOff = (HiddenField)myPage.FindControl("hfSignOff"); hfSignOff.Value = SignOff; var hfPageReadonly = (HiddenField)myPage.FindControl("hfPageReadonly"); hfPageReadonly.Value = "No"; var imgSignOff = (HtmlImage)myPage.FindControl("imgSignOff"); try { imgSignOff.Visible = false; if (SignOff == "Complete") { hfPageReadonly.Value = "Yes"; imgSignOff.Visible = true; } else { if (myPage.User.Identity.Name.ToLower() == WorkingAppraisee.UserID.ToLower() || myPage.User.Identity.Name.ToLower() == WorkingAppraisee.AppraiserID.ToLower()) { if (pageFor == "Both") { hfPageReadonly.Value = "No"; } else { if (pageFor == AppraislRole) { hfPageReadonly.Value = "No"; } else { hfPageReadonly.Value = "Yes"; } } } else { if (WorkingProfile.UserRole == "Admin") { hfPageReadonly.Value = "No"; } else { hfPageReadonly.Value = "Yes"; } } } } catch { } try { hfPageReadonly = (HiddenField)myPage.FindControl("hfPageReadonly"); var imgRecovery = (HtmlImage)myPage.FindControl("imgRecovery"); var imgCommentsMenu = (HtmlImage)myPage.FindControl("imgCommentsMenu"); var imgEP = (HtmlImage)myPage.FindControl("imgEP"); if (hfPageReadonly.Value == "Yes") { imgRecovery.Visible = false; imgCommentsMenu.Visible = false; } else { imgCommentsMenu.Visible = true; if (pageRecover == "Y") { imgRecovery.Visible = true; } } if (pageEP == "Y") { imgEP.Visible = true; } } catch { } }