protected void grdRequest_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            GridView grd              = sender as GridView;
            int      orgID            = int.Parse(grd.SelectedRow.Cells[0].Text);
            int      tippaniID        = int.Parse(grd.SelectedRow.Cells[1].Text);
            int      tippaniProcessID = int.Parse(grd.SelectedRow.Cells[2].Text);

            this.hdnTippaniStatus.Value = grd.SelectedRow.Cells[13].Text;

            List <ATTGeneralTippaniSummary> lst = BLLGeneralTippaniDetail.GetLeaveTippaniDetail(orgID, tippaniID, tippaniProcessID, LeaveMode.Recommend);

            this.ClearLeaveDetail();
            this.SetLeaveRecommendList();

            this.grdRecommendation.DataSource = "";
            this.grdRecommendation.DataBind();

            this.grdLeave.DataSource = lst;
            this.grdLeave.DataBind();

            this.grdLeaveDetail.DataSource = lst;
            this.grdLeaveDetail.DataBind();

            if (this.hdnForm.Value == "0")
            {
                this.ddlDStatus_Rqd.Enabled = true;
                this.btnSendBack.Enabled    = true;
                this.btnSubmit.Enabled      = true;

                if (this.TippaniRequestViewer.IsValidForSending == true)
                {
                    this.txtNote.Text           = BLLGeneralTippaniProcess.GetTippaniText(orgID, tippaniID, tippaniProcessID);
                    this.btnSaveAsDraft.Enabled = true;
                }
            }
            else if (this.hdnForm.Value == "1")
            {
                this.ddlDStatus_Rqd.Enabled = false;
                this.btnSendBack.Enabled    = false;
                this.btnSubmit.Enabled      = false;
                this.btnSaveAsDraft.Enabled = false;
            }

            ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();
            info.OrgID       = orgID;
            info.TippaniID   = tippaniID;
            info.RequestType = TippaniProcessRequestType.History;

            this.TippaniHistory.ProcessID = tippaniProcessID;
            this.TippaniHistory.LoadTippaniHistory(info);
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
    public void LoadCommitteeMemberDetail(int orgID, int tippaniID, int tipPrcID)
    {
        this.SetCommitteeMemberSessionList();
        ATTCommitteeByTippani committee = null;

        try
        {
            committee = BLLCommitteeByTippani.GetCommitteeByTippaniByTIDs(orgID, tippaniID);
            if (committee == null)
            {
                this.lblStatusMessage.Text = "Error:: Zero object or multiple objects are selected.<br>Please check the system.";
                this.programmaticModalPopup.Show();
                return;
            }
            else
            {
                this.ddlOrg_Rqd.SelectedValue = committee.CommitteeOrgID.ToString();
                this.txtCommittee_Rqd.Text    = committee.CommitteeName;
                this.txtDesc.Text             = committee.Description;
            }
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }

        try
        {
            List <ATTGeneralTippaniSummary> lst = BLLGeneralTippaniDetail.GetCommitteeTippaniDetail(orgID, tippaniID);

            foreach (ATTGeneralTippaniSummary summary in lst)
            {
                this.CommitteeMemberList.Add(summary);
            }
            this.grdCommittee.DataSource = this.CommitteeMemberList;
            this.grdCommittee.DataBind();

            this.txtNote.Text = BLLGeneralTippaniProcess.GetTippaniText(orgID, tippaniID, tipPrcID);
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }

        this.hdnIDs.Value       = committee.CommitteeOrgID.ToString() + "/" + committee.CommitteeID.ToString();
        this.ddlOrg_Rqd.Enabled = false;
    }
Exemplo n.º 3
0
    public void LoadDeputationDetail(int orgID, int tippaniID, int tipPrcID)
    {
        this.SetDeputationListSession();
        try
        {
            List <ATTGeneralTippaniSummary> lst = BLLGeneralTippaniDetail.GetDeputationTippaniDetail(orgID, tippaniID);
            foreach (ATTGeneralTippaniSummary summary in lst)
            {
                this.DeputationList.Add(summary);
            }
            this.grdDeputation.DataSource = this.DeputationList;
            this.grdDeputation.DataBind();

            this.txtNote.Text = BLLGeneralTippaniProcess.GetTippaniText(orgID, tippaniID, tipPrcID);
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //ATTUserLogin user = ((ATTUserLogin)Session["Login_User_Detail"]);

        if (!IsPostBack)
        {
            this.LoadTippaniStatus();

            if (Request.UrlReferrer != null && Path.GetFileName(Request.UrlReferrer.ToString()).ToUpper() == "TIPPANIDETAILSEARCH.ASPX" && Session["tippani_mode"] != null)
            {
                string action = "E";
                this.hdnMode.Value = action;

                string composite = Session["tippani_mode"].ToString();
                char[] token     = { '/' };

                int orgID     = int.Parse(composite.Split(token)[0]);
                int tippaniID = int.Parse(composite.Split(token)[1]);
                int tipPrcID  = int.Parse(composite.Split(token)[2]);

                this.hdnIDs.Value = orgID.ToString() + "/" + tippaniID.ToString() + "/" + tipPrcID.ToString();

                Session["tippani_mode"] = null;

                this.Tippani.ActionMode = action;
                this.Tippani.LoadTippaniDetail(orgID, tippaniID);

                this.txtNote.Text = BLLGeneralTippaniProcess.GetTippaniText(orgID, tippaniID, 1);

                this.TippaniAttachment.ActionMode = action;
                this.TippaniAttachment.LoadTippaniAttachmentDetail(orgID, tippaniID);

                //status = -1 --> tippani channel visible, channel person not added
                //status = 0 --> tippani channel invisible, channel person added
                //status > 0 --> tippani has been modified by next person so not editable
                int status = BLLGeneralTippaniProcess.GetTippaniNextStatus(orgID, tippaniID, 2);
                if (status <= -1)
                {
                    this.chnlPerson.Visible = true;
                }
                else if (status == 0)
                {
                    this.chnlPerson.Visible  = false;
                    this.lblFinalStatus.Text = "यो टिप्पणी पठाइसकेको हुनाले सिफारीस कर्त्ता / प्रमाणित कर्ता छान्नसक्नु हुन्न तर Submit गर्न सक्नुहुन्छ।";
                }
                else if (status > 0)
                {
                    this.btnSubmit.Enabled   = false;
                    this.lblFinalStatus.Text = "यस टिप्पणीमा, टिप्पणी पाउने व्यक्तिले काम गरिसकेको हुनाले Submit गर्न सक्नुहुन्न।";
                }
            }
            //else if (Request.UrlReferrer != null && Path.GetFileName(Request.UrlReferrer.ToString()).ToUpper() == "MESSAGEVIEW.ASPX" && Session["tippani_from_message"] != null)
            else if (Session["tippani_from_message"] != null)
            {
                this.lblConfirmation.Text = "यो टिप्पणी message बाट उठाएको हो ।";
                string composite = Session["tippani_from_message"].ToString();
                Session["tippani_from_message"] = null;
                char[] token = { '/' };

                int orgID = int.Parse(composite.Split(token)[0]);
                int msgID = int.Parse(composite.Split(token)[1]);

                this.TippaniAttachment.ActionMode = "E";
                this.TippaniAttachment.LoadAttachmentFromMessage(orgID, msgID);

                this.LoadBodyFromMessage(orgID, msgID);
            }
            //else if (Request.UrlReferrer != null && Path.GetFileName(Request.UrlReferrer.ToString()).ToUpper() == "MESSAGEVIEW.ASPX" && Session["tippani_from_message"] != null)
            else if (Session["tippani_from_Dartaa_chalaani"] != null)
            {
                this.lblConfirmation.Text = "यो टिप्पणी Dartaa Chalaani बाट उठाएको हो ।";
                string composite = Session["tippani_from_Dartaa_chalaani"].ToString();
                Session["tippani_from_Dartaa_chalaani"] = null;
                char[] token = { '_' };

                int    orgID   = int.Parse(composite.Split(token)[0]);
                string regDate = composite.Split(token)[1];
                int    regNo   = int.Parse(composite.Split(token)[2]);

                this.hdnDarIDs.Value = orgID.ToString() + "_" + regDate + "_" + regNo.ToString();

                this.TippaniAttachment.ActionMode = "E";
                this.TippaniAttachment.LoadAttachmentFromDartaaChalaani(orgID, regDate, regNo);

                this.LoadBodyFromDartaaChalaani(orgID, regDate, regNo);
            }
            else
            {
                Session["tippani_mode"] = null;
            }
        }
    }