public ATTCommitteeByTippani GetCommittee()
    {
        ATTCommitteeByTippani committee = new ATTCommitteeByTippani();

        committee.CommitteeOrgID = int.Parse(this.ddlOrg_Rqd.SelectedValue);
        if (this.hdnIDs.Value.Trim() == "")
        {
            committee.CommitteeID = 0;
            committee.Action      = "A";
        }
        else
        {
            char[] token = { '/' };
            committee.CommitteeID = int.Parse(this.hdnIDs.Value.Split(token)[1]);
            committee.Action      = "E";
        }
        committee.CommitteeName = this.txtCommittee_Rqd.Text;
        committee.Description   = this.txtDesc.Text;
        committee.Type          = "C";
        committee.OrgID         = this.User.OrgID;
        committee.TippaniID     = 0;
        committee.EntryBy       = this.User.UserName;

        return(committee);
    }
示例#2
0
        public static ATTCommitteeByTippani GetCommitteeByTippaniByTIDs(int orgID, int tippaniID)
        {
            ATTCommitteeByTippani obj = null;

            try
            {
                DataTable tbl = DLLCommitteeByTippani.GetCommitteeByTippaniByTIDs(orgID, tippaniID);
                if (tbl.Rows.Count == 1)
                {
                    DataRow row = tbl.Rows[0];

                    obj = new ATTCommitteeByTippani();

                    obj.CommitteeOrgID   = int.Parse(row["comm_org_id"].ToString());
                    obj.CommitteeOrgName = row["org_name"].ToString();
                    obj.CommitteeID      = int.Parse(row["committee_id"].ToString());
                    obj.CommitteeName    = row["committee_name"].ToString();
                    obj.Description      = row["description"].ToString();
                    obj.Type             = row["type"].ToString();
                    obj.OrgID            = int.Parse(row["org_id"].ToString());
                    obj.TippaniID        = int.Parse(row["tippani_id"].ToString());
                }
                return(obj);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    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;
    }
示例#4
0
        public static int AddCommitteeByTippani
        (
            ATTCommitteeByTippani comm,
            object tran,
            int tippaniSubjectID,
            TippaniSubject subject,
            int tippaniID

        )
        {
            string SP = "";

            if (comm.Action == "A")
            {
                SP = "SP_ADD_COMMITTEE_BY_TIPPANI";
            }
            else if (comm.Action == "E")
            {
                SP = "SP_UP_COMMITTEE_BY_TIPPANI";
            }

            List <OracleParameter> paramArray = new List <OracleParameter>();

            paramArray.Add(Utilities.GetOraParam("p_comm_org_id", comm.CommitteeOrgID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("p_committee_id", comm.CommitteeID, OracleDbType.Int16, ParameterDirection.InputOutput));
            paramArray.Add(Utilities.GetOraParam("p_committee_name", comm.CommitteeName, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("p_description", comm.Description, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("p_type", comm.Type, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("p_org_id", comm.OrgID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("p_tippani_id", tippaniID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("p_entry_by", comm.EntryBy, OracleDbType.Varchar2, ParameterDirection.Input));

            try
            {
                SqlHelper.ExecuteNonQuery(tran as OracleTransaction, CommandType.StoredProcedure, SP, paramArray.ToArray());
                int CID = int.Parse(paramArray[1].Value.ToString());
                comm.CommitteeID = CID;
                return(CID);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#5
0
        public static int AddCommitteeByTippani
        (
            ATTCommitteeByTippani comm,
            object tran,
            int tippaniSubjectID,
            TippaniSubject subject,
            int tippaniID

        )
        {
            try
            {
                return(DLLCommitteeByTippani.AddCommitteeByTippani(comm, tran, tippaniSubjectID, subject, tippaniID));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#6
0
    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;

            ATTCommitteeByTippani c = BLLCommitteeByTippani.GetCommitteeByTippaniByTIDs(orgID, tippaniID);
            if (c != null)
            {
                this.lblCommitteeName.Text = c.CommitteeName;
                this.lblDescription.Text   = c.Description;
            }
            else
            {
                this.lblCommitteeName.Text = "";
                this.lblDescription.Text   = "";
            }

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

            this.grdDetail.DataSource = lst;
            this.grdDetail.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();
        }
    }