Exemplo n.º 1
0
        private void Assemblies_Title()
        {
            string userID = User.Identity.Name;

            LabelSchoolyear.Text     = DateFC.SchoolYearFrom("-", WorkingProfile.SchoolYear);
            LabelSchool.Text         = WorkingProfile.SchoolName;
            LabelPrincipal.Text      = WorkingProfile.SchoolPrincipal;
            LabelSuperintendent.Text = WorkingProfile.UserArea;
            hfSchoolcode.Value       = WorkingProfile.SchoolCode;
            hfSchoolyear.Value       = WorkingProfile.SchoolYear;
            hfUserRole.Value         = WorkingProfile.UserRole;
            hfUserID.Value           = User.Identity.Name;
            hfSignOff.Value          = SignOff.Signature("Result", userID, WorkingProfile.UserRole, WorkingProfile.SchoolYear, WorkingProfile.SchoolCode, "School");
            hfSignOffSO.Value        = SignOff.Signature("Result", userID, WorkingProfile.UserRole, WorkingProfile.SchoolYear, WorkingProfile.SchoolCode, "SO");
            hfPublish.Value          = SignOff.Signature("Result", userID, WorkingProfile.UserRole, WorkingProfile.SchoolYear, WorkingProfile.SchoolCode, "Publish");
            try
            {
                foreach (Control pControl in FormContent.Controls)
                {
                    if (pControl is Label)
                    {
                        string code = pControl.ID.Replace("Label", "");
                        Label  lbl  = (Label)pControl;
                        lbl.Text = FormData.Title(code);
                    }
                }
            }
            catch (Exception ex)
            {
                var ms = ex.Message;
            }
        }
Exemplo n.º 2
0
        private void CreateReportandSaveToDB(string schoolYear, string schoolCode, string publishCycle, string GoalType, string schoolName, string schoolNameB)
        {
            string reportName = WebConfig.getValuebyKey("PublishDocumentName");

            string userID = WorkingProfile.UserID;


            string publishDate = DateFC.YMD(DateTime.Now);

            Byte[] pdfReport = ReportRender.GetOneReport(reportName, userID, schoolYear, schoolCode, "1");

            string result = UploadFileToSharePointSite.PushToSite("SLIP", pdfReport, schoolYear, schoolCode, schoolName, schoolNameB);

            if (result == "Successful")
            {
                string action        = btnReturn.Text;
                string signOffResult = SignOff.Signature(action, userID, WorkingProfile.UserRole, schoolYear, schoolCode, "Publish", publishDate);
                // SaveSLIPPublishDataToHistoryDirectory(schoolCode + ".PDF", pdfReport);
                PushToSP.SaveFileToHistoryFolder(WorkingProfile.SchoolYear, schoolCode + ".PDF", pdfReport);
                errorlabel.Text      = "The School PLF has been published to School Web site.";
                errorlabel.ForeColor = Color.Red;
            }
            else
            {
                errorlabel.Text = "The School PLF published failed to School Web site.";
            }
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         // btnReturn.Visible = false;
         string userID        = User.Identity.Name;
         string schoolyear    = Page.Request.QueryString["yID"];
         string schoolcode    = Page.Request.QueryString["sID"];
         string signType      = Page.Request.QueryString["tID"];
         string signOffResult = SignOff.Signature("Result", userID, WorkingProfile.UserRole, schoolyear, schoolcode, signType);
         string actionName    = "Sign Off";
         if (signOffResult == "SignedOff")
         {
             actionName = "Undo SignOff";
         }
         btnReturn.Text = actionName;
         string signOffName = "School Principal";
         if (signType != "School")
         {
             signOffName = "Superintendent";
         }
         if (WorkingProfile.UserRole == "Superintendent")
         {
             signOffName = "Superintendent";
             signType    = "SO";
         }
         LabelSignOffTitle.Text = signOffName + " " + actionName;
         txtUserName.Text       = User.Identity.Name;
         txtUserName.Enabled    = false;
         // btnReturn.Attributes.Add("OnClick", "javascript:ReturnVerify()");
         SignOffDateDiv.Visible = false;
     }
 }
Exemplo n.º 4
0
        protected void btnReturn_Click(object sender, EventArgs e)
        {
            string userID     = User.Identity.Name;
            string schoolyear = Page.Request.QueryString["yID"];
            string schoolcode = Page.Request.QueryString["sID"];
            string signType   = Page.Request.QueryString["tID"];

            string action        = btnReturn.Text;
            string vDate         = DateFC.YMD(DateTime.Now);
            string signOffResult = SignOff.Signature(action, userID, WorkingProfile.UserRole, schoolyear, schoolcode, "Publish", vDate);

            CreateReportandSaveToDB(schoolyear, schoolcode, "1", "All", WorkingProfile.SchoolName, WorkingProfile.SchoolNameB);
        }
Exemplo n.º 5
0
        private void Assemblies_Title()
        {
            string userID = User.Identity.Name;

            LabelSchoolyear.Text     = DateFC.SchoolYearFrom("-", schoolYear);
            LabelSchool.Text         = WorkingProfile.SchoolName;
            LabelPrincipal.Text      = WorkingProfile.SchoolPrincipal;
            LabelSuperintendent.Text = WorkingProfile.UserAreaSuperintendent;
            hfSchoolcode.Value       = schoolCode;
            hfSchoolyear.Value       = schoolYear;
            hfUserRole.Value         = WorkingProfile.UserRole;
            hfUserID.Value           = User.Identity.Name;
            hfSignOff.Value          = SignOff.Signature("Result", userID, "", schoolYear, schoolCode, "School");
            hfSignOffSO.Value        = SignOff.Signature("Result", userID, "", schoolYear, schoolCode, "SO");
            hfPublish.Value          = SignOff.Signature("Result", userID, "", schoolYear, schoolCode, "Publish");
            hfComplete.Value         = SignOff.Signature("Result", userID, "", schoolYear, schoolCode, "Complete");
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                try
                {
                    // LabelTitle.Text = "PLF Publish Verify";
                    //  btnReturn.Visible = false;
                    string actionName    = "Publish";
                    string userID        = User.Identity.Name;
                    string schoolyear    = Page.Request.QueryString["yID"];
                    string schoolcode    = Page.Request.QueryString["sID"];
                    string signType      = Page.Request.QueryString["tID"];
                    string signOffResult = SignOff.Signature("Result", userID, WorkingProfile.UserRole, schoolyear, schoolcode, "SO");
                    txtUserName.Text    = User.Identity.Name;
                    txtUserName.Enabled = false;
                    if (signOffResult != "SignedOff")
                    {
                        // btnReturn.Enabled = false;
                        errorlabel.Visible   = true;
                        errorlabel.ForeColor = Color.Red;
                        errorlabel.Text      = "Superintendent has to signed off first before you can publish the your school PLF.";
                    }
                    btnReturn.Text = actionName;
                    //  string signOffName = "School Principal";

                    // LabelTitle.Text = signOffName + " " + actionName;

                    //   btnReturn.Attributes.Add("OnClick", "javascript:ReturnVerify()");
                    SignOffDateDiv.Visible = false;
                }



                catch (Exception exp)
                {
                    var sm = exp.Message;
                }
            }
        }
Exemplo n.º 7
0
 protected void btnReturn_Click(object sender, EventArgs e)
 {
     try
     {
         string userID     = User.Identity.Name;
         string schoolyear = Page.Request.QueryString["yID"];
         string schoolcode = Page.Request.QueryString["sID"];
         string signType   = Page.Request.QueryString["tID"];
         if (WorkingProfile.UserRole == "Superintendent")
         {
             signType = "SO";
         }
         string   action        = btnReturn.Text;
         DateTime cDate         = DateTime.Now;
         string   vDate         = DateFC.YMD(cDate);
         string   signOffResult = SignOff.Signature("SignOff", userID, WorkingProfile.UserRole, schoolyear, schoolcode, signType);
     }
     catch (Exception exp)
     {
         var em = exp.Message;
     }
 }