protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); ValidateUser(); //ckeContents.config.toolbar = new object[] // { // new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "SpellChecker", "Scayt" }, // new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" }, // "/", // new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, // new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" }, // new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, // "/", // new object[] { "Styles", "Format", "Font", "FontSize" }, // new object[] { "TextColor", "BGColor" }, // }; ckeContents.config.toolbar = new object[] { new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "SpellChecker", "Scayt" }, new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" }, new object[] { "Image", "Table", "HorizontalRule", "Smiley", "SpecialChar" }, "/", new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" }, new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, "/", new object[] { "Styles", "Format", "Font", "FontSize" }, new object[] { "TextColor", "BGColor" }, }; if (!Page.IsPostBack) { string strUsername = Request.Cookies["Speedo"]["UserName"]; int intGroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString().ToInt(); using (clsGroupUpdate objView = new clsGroupUpdate()) { objView.GroupUpdateCode = intGroupUpdateCode; objView.Fill(); txtTitle.Text = objView.Title; txtDescription.Text = objView.Description; lblGroupHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "1")); txtGroupHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "1"); //lblDivisionHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "2")); //txtDivisionHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "2"); txtPhotoSource.Text = objView.PhotoSource; hdnGroupHead.Value = GroupUpdateApproval.GetApprover(GroupUpdateApproval.GroupUpdateUserType.GroupHead, clsEmployee.GetDepartmentCode(strUsername)); ckeContents.Text = objView.Content; txtContributor.Text = objView.Contributor; } } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); ValidateUser(); string strUsername = Request.Cookies["Speedo"]["UserName"]; int intGroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString().ToInt(); string strStatus = ""; using (clsGroupUpdate objView = new clsGroupUpdate()) { objView.GroupUpdateCode = intGroupUpdateCode; objView.Fill(); if (objView.Status == "0") { strStatus = "For Approval"; } else if (objView.Status == "1") { strStatus = "Approved"; } else if (objView.Status == "2") { strStatus = "Disapproved"; } else if (objView.Status == "3") { strStatus = "Voided"; } lblContributor.Text = objView.Contributor; lblTitle.Text = objView.Title; lblCreateBy.Text = clsEmployee.GetName(objView.CreateBy); lblCreateOn.Text = Convert.ToDateTime(objView.CreateOn).ToString("MMM dd, yyyy"); //lblLink.Text = "<a href='../UploadedFiles/GroupUpdates/" + objView.ImageFilename + "' target='_blank'>View Image</a>"; lblImage.Text = "<img src='../UploadedFiles/GroupUpdates/" + objView.ImageFilename + "' width='200' height='119' alt='' /></a>"; lblDescription.Text = objView.Description; lblContent.Text = objView.Content; lblStatus.Text = strStatus; lblPhotoSource.Text = objView.PhotoSource; lblGroupHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "1")); txtGroupHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "1"); //lblDivisionHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "2")); //txtDivisionHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "2"); } }
protected void LoadGroupUpdate() { string strGroupUpdateCode = ""; //string strActiveDivisionCode = ""; //if (string.IsNullOrEmpty(Request.QueryString["DivisionCode"])) //{ // strActiveDivisionCode = "ACDMCS"; //} //else //{ // strActiveDivisionCode = Request.QueryString["DivisionCode"].ToString(); //} //if (string.IsNullOrEmpty(Request.QueryString["GroupUpdateCode"])) //{ // strGroupUpdateCode = clsGroupUpdate.GetTopNews(strActiveDivisionCode).ToString(); //} //else //{ // strGroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString(); //} strGroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString(); using (clsGroupUpdate objUpdate = new clsGroupUpdate()) { //objUpdate.GroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString().ToInt(); objUpdate.GroupUpdateCode = strGroupUpdateCode.ToInt(); objUpdate.Fill(); string strPhoto = objUpdate.PhotoSource != string.Empty ? "Photo By: " + objUpdate.PhotoSource : ""; string strContributor = objUpdate.Contributor != string.Empty ? "<br/>Contributor: " + objUpdate.Contributor + "<br/>Posted by: <a href='../UserPage/Userpage.aspx?username="******"'>" + clsEmployee.GetName(objUpdate.CreateBy) + "</a> " : "<br/>Posted by: <a href='../UserPage/Userpage.aspx?username="******"'>" + clsEmployee.GetName(objUpdate.CreateBy) + "</a> "; string strImage = "<a href='#'><img class='imgl' src='../UploadedFiles/GroupUpdates/" + objUpdate.ImageFilename + "' width='420' height='250' alt='' /></a></img>"; litContent.Text += "<div class='post-title'><h2><font style='font-size:25px; font-weight:bold;'>" + objUpdate.Title + "</font></h2></div>"; litContent.Text += "<div class='post-date'><font style='font-size:11px;'>" + objUpdate.CreateOn.ToString("dddd, MMM dd, yyyy") + strContributor + "</font></div>"; litContent.Text += "<p><font style='font-size:12px;font-style:italic;'>" + objUpdate.Description + "</font></p>"; litContent.Text += "<p><img src='../UploadedFiles/GroupUpdates/" + objUpdate.ImageFilename + "' alt='' class='bordered' height='200px' width='350px' /></p>"; litContent.Text += strPhoto == string.Empty ? "" : "<font style='font-size:12px;font-style:italic;'>" + strPhoto + "</font>"; litContent.Text += "<font style='font-size:14px;'>" + objUpdate.Content + "</font>"; if (string.IsNullOrEmpty(objUpdate.Title)) { litContent.Text = "<p>" + "No Updates for this division" + "</p>"; } } }