Пример #1
0
        public static List <ATTGeneralTippaniRequestInfo> GetGeneralTippaniInfo(ATTGeneralTippaniRequestInfo info, int sIndex, int eIndex, ref decimal totalRecord)
        {
            List <ATTGeneralTippaniRequestInfo> lst = new List <ATTGeneralTippaniRequestInfo>();

            try
            {
                foreach (DataRow row in DLLGeneralTippani.GetGeneralTippaniInfo(info, sIndex, eIndex, ref totalRecord).Rows)
                {
                    ATTGeneralTippaniRequestInfo obj = new ATTGeneralTippaniRequestInfo();

                    obj.OrgID             = int.Parse(row["org_id"].ToString());
                    obj.TippaniID         = int.Parse(row["tippani_id"].ToString());
                    obj.ProcessBy         = row["p_name"].ToString();
                    obj.ProcessByID       = int.Parse(row["emp_id"].ToString());
                    obj.TippaniStatusName = row["tippani_status_name"].ToString();
                    obj.ProcessOn         = row["tippani_on"].ToString();

                    lst.Add(obj);
                }
                return(lst);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    public void LoadReceiver(bool b)
    {
        //decimal totalRecord = 0;
        decimal totalRecord = 1;
        int     sIndex      = int.Parse(this.hdnIndex.Value);
        int     eIndex      = this.GetMaxRecordNumber();

        this.hdnForm.Value = "1";

        ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();

        info.OrgID            = this.User.OrgID;
        info.TippaniSubjectID = (int)this.TippaniSubjectType;
        info.ProcessByID      = this.User.PID;
        info.Filter           = this.GetFilter();

        this.grdRequest.DataSource = BLLGeneralTippaniRequestInfo.GetTippaniRequestInfoList(info, sIndex, eIndex, ref totalRecord);
        this.grdRequest.DataBind();
        //if (Count > 0)
        {
            this.hdnTotalRecord.Value = totalRecord.ToString();
        }

        this.ProcessPaging();
    }
    public void LoadTippaniRequest(int Count)
    {
        decimal totalRecord = 1;
        int     sIndex      = int.Parse(this.hdnIndex.Value);
        int     eIndex      = this.GetMaxRecordNumber();

        ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();

        info.OrgID            = this.User.OrgID;
        info.TippaniSubjectID = (int)this.TippaniSubjectType;
        info.ProcessToID      = this.User.PID;
        info.Filter           = this.GetFilter();

        try
        {
            List <ATTGeneralTippaniRequestInfo> lst = BLLGeneralTippaniRequestInfo.GetTippaniRequestInfoList(info, sIndex, eIndex, ref totalRecord);
            this.grdRequest.DataSource = lst;
            this.grdRequest.DataBind();

            if (Count > 0)
            {
                this.hdnTotalRecord.Value = totalRecord.ToString();
            }

            this.ProcessPaging();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #4
0
        public static DataTable GetTippaniRequestHistory(ATTGeneralTippaniRequestInfo info)
        {
            //string orderString = "";
            string SP = "SELECT V.ORG_ID, V.TIPPANI_ID, V.TIPPANI_PROCESS_ID, ";

            SP += " V.SEND_TYPE, V.IS_CHANNEL_PERSON, V.TIPPANI_TEXT, ";
            SP += "V.SENDER_ORG_ID, V.SENDER_UNIT_ID, V.SENDER_ORG_NAME,";
            SP += "V.SENDER_UNIT_NAME, V.PROCESS_BY_ID, V.PROCESS_BY, ";
            SP += "V.SEND_ON, V.RECEIVER_ORG_ID, V.RECEIVER_UNIT_ID, ";
            SP += "V.RECEIVER_ORG_NAME, V.RECEIVER_UNIT_NAME, V.PROCESS_TO_ID, ";
            SP += "V.PROCESS_TO, V.TIPPANI_SUBJECT_ID, V.TIPPANI_SUBJECT_NAME, ";
            SP += "V.TIPPANI_STATUS_ID, V.TIPPANI_STATUS_NAME, V.PRIORITY_ID, ";
            SP += "V.PROCESS_STATUS_ID, V.PROCESS_STATUS_NAME, V.NOTE ";
            SP += "FROM VW_TIPPANI_PROCESS_DETAIL V WHERE 'SJ' = 'SJ' and";

            SP = SP + " V.org_id = " + info.OrgID.ToString();
            SP = SP + " and V.tippani_id = " + info.TippaniID.ToString();

            SP = SP + " ORDER BY V.TIPPANI_PROCESS_ID";
            try
            {
                return(SqlHelper.ExecuteDataset(CommandType.Text, SP, Module.OAS, null).Tables[0]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    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();
        }
    }
Пример #6
0
        public static DataTable GetTippaniRequestInfo(ATTGeneralTippaniRequestInfo info, int sIndex, int eIndex, ref decimal totalRecord)
        {
            string orderString = "";
            string SP          = "SELECT V.ORG_ID, V.TIPPANI_ID, V.TIPPANI_PROCESS_ID, ";

            SP += " V.SEND_TYPE, V.IS_CHANNEL_PERSON, V.TIPPANI_TEXT, ";
            SP += "V.SENDER_ORG_ID, V.SENDER_UNIT_ID, V.SENDER_ORG_NAME,";
            SP += "V.SENDER_UNIT_NAME, V.PROCESS_BY_ID, V.PROCESS_BY, ";
            SP += "V.SEND_ON, V.RECEIVER_ORG_ID, V.RECEIVER_UNIT_ID, ";
            SP += "V.RECEIVER_ORG_NAME, V.RECEIVER_UNIT_NAME, V.PROCESS_TO_ID, ";
            SP += "V.PROCESS_TO, V.TIPPANI_SUBJECT_ID, V.TIPPANI_SUBJECT_NAME, ";
            SP += "V.TIPPANI_STATUS_ID, V.TIPPANI_STATUS_NAME, V.PRIORITY_ID, ";
            SP += "V.PROCESS_STATUS_ID, V.PROCESS_STATUS_NAME, '' NOTE ";
            SP += "FROM VW_TIPPANI_PROCESS_DETAIL V WHERE 1 = 1 ";
            string criteria = "";

            criteria = criteria + " and V.org_id = " + info.OrgID.ToString();
            criteria = criteria + " and V.tippani_subject_id = " + info.TippaniSubjectID.ToString();

            if (info.ProcessToID > 0)
            {
                criteria    = criteria + " AND V.PROCESS_TO_ID = " + info.ProcessToID.ToString();
                orderString = "V.PROCESS_TO_ID";
            }

            if (info.ProcessByID > 0)
            {
                criteria    = criteria + " AND PROCESS_BY_ID = " + info.ProcessByID.ToString();
                orderString = "V.PROCESS_BY_ID";
            }

            criteria = criteria + " AND V.PROCESS_BY_ID IS NOT NULL";
            criteria = criteria + info.Filter;

            //SP = SP + " ORDER BY TP.TIP_FROM_ORG_ID, TP.TIPPANI_ID, TP." + orderString + ", TP.SEND_ON, TP.STATUS_ID"; ;
            criteria = criteria + " ORDER BY v.org_id, v.TIPPANI_ID desc, v.TIPPANI_PROCESS_ID desc, v.SEND_ON, v.process_STATUS_ID";;

            GetConnection DBConn = new GetConnection();

            try
            {
                OracleConnection Conn = DBConn.GetDbConn(Module.OAS);
                if (totalRecord > 0)
                {
                    totalRecord = (decimal)SqlHelper.ExecuteScalar(Conn, CommandType.Text, "SELECT COUNT(*) FROM VW_TIPPANI_PROCESS_DETAIL V WHERE 1 = 1 " + criteria, null);
                }

                DataTable tbl = SqlHelper.ExecuteDataset(Conn, CommandType.Text, SP + criteria, sIndex, eIndex, null).Tables[0];
                return(tbl);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DBConn.CloseDbConn();
            }
        }
    protected void grdRequest_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Cells[0].Visible  = false;
        e.Row.Cells[1].Visible  = false;
        e.Row.Cells[2].Visible  = false;
        e.Row.Cells[3].Visible  = false;
        e.Row.Cells[4].Visible  = false;
        e.Row.Cells[5].Visible  = false;
        e.Row.Cells[6].Visible  = false;
        e.Row.Cells[12].Visible = false;

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            if (((ATTGeneralTippaniRequestInfo)e.Row.DataItem).ProcessStatusName == "")
            {
                e.Row.ForeColor = System.Drawing.Color.Red;
            }
        }

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            info = (ATTGeneralTippaniRequestInfo)e.Row.DataItem;

            //if (this.hdnForm.Value == "0")
            //    dynamicEmpID = info.ProcessToID;
            //else
            //    dynamicEmpID = info.ProcessByID;

            if (orgID == info.OrgID && tippaniID == info.TippaniID)
            {
                //if (this.grdRequest.Rows[firstRow].Cells[11].RowSpan == 0)
                //    this.grdRequest.Rows[firstRow].Cells[11].RowSpan = 2;
                //else
                //    this.grdRequest.Rows[firstRow].Cells[11].RowSpan += 1;
                //e.Row.Cells[11].Visible = false;
            }

            else //It's a new category
            {
                e.Row.VerticalAlign = VerticalAlign.Middle;

                orgID     = info.OrgID;
                tippaniID = info.TippaniID;
                empID     = dynamicEmpID;

                firstRow = e.Row.RowIndex;
                if (e.Row.RowIndex != 0)
                {
                    foreach (TableCell cell in e.Row.Cells)
                    {
                        cell.Style.Add("border-top", "#4F69A2 1px solid");
                    }
                }
            }
        }
    }
    protected void lnkReceiver_Click(object sender, EventArgs e)
    {
        this.ClearME();
        this.hdnForm.Value = "1";

        ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();

        info.OrgID            = this.User.OrgID;
        info.TippaniSubjectID = 2;//visit id
        info.ProcessByID      = this.User.PID;

        //this.grdRequest.DataSource = BLLGeneralTippaniRequestInfo.GetTippaniRequestInfoList(info);
        //this.grdRequest.DataBind();
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();

        info.ProcessToID = this.User.PID;
        try
        {
            //List<ATTGeneralTippaniRequestInfo> lst = BLLGeneralTippaniRequestInfo.GetTippaniRequestInfoList(info);
            //this.grdRequest.DataSource = lst;
            //this.grdRequest.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #10
0
    void LoadTippani(int Count)
    {
        ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();

        info.OrgID            = int.Parse(this.ddlOrg_Rqd.SelectedValue);
        info.TippaniSubjectID = int.Parse(this.ddlTipaniSubject_Rqd.SelectedValue);
        info.FromDate         = this.txtFromDate.Text;
        info.ToDate           = this.txtToDate.Text;
        info.TippaniStatusID  = int.Parse(this.ddlStatus.SelectedValue);
        info.ProcessBy        = this.txtFirstName.Text;

        try
        {
            decimal totalRecord = Count;
            int     sIndex      = int.Parse(this.hdnIndex.Value);
            int     eIndex      = this.GetMaxRecordNumber();

            this.grdTippaniLst.DataSource = BLLGeneralTippani.GetGeneralTippaniInfo(info, sIndex, eIndex, ref totalRecord);
            this.grdTippaniLst.DataBind();

            if (Count > 0)
            {
                this.hdnTotalRecord.Value = totalRecord.ToString();
            }

            if (this.grdTippaniLst.Rows.Count > 0)
            {
                decimal lastIndex = sIndex + eIndex;

                if (lastIndex > decimal.Parse(this.hdnTotalRecord.Value))
                {
                    lastIndex = decimal.Parse(this.hdnTotalRecord.Value);
                }

                this.lblPaging.Text = "Record (" + (sIndex + 1).ToString() + " - " + lastIndex.ToString() + ") of " + this.hdnTotalRecord.Value;
            }
            else
            {
                this.lblPaging.Text = "";
            }
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
    void LoadTippaniRequest()
    {
        ATTGeneralTippaniRequestInfo info = new ATTGeneralTippaniRequestInfo();

        info.OrgID            = this.User.OrgID;
        info.TippaniSubjectID = 2;//visit id
        info.ProcessToID      = this.User.PID;
        try
        {
            //List<ATTGeneralTippaniRequestInfo> lst = BLLGeneralTippaniRequestInfo.GetTippaniRequestInfoList(info);
            //this.grdRequest.DataSource = lst;
            //this.grdRequest.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #12
0
    public void LoadTippaniHistory(ATTGeneralTippaniRequestInfo info)
    {
        try
        {
            decimal d = 0;
            List <ATTGeneralTippaniRequestInfo> lst = BLLGeneralTippaniRequestInfo.GetTippaniRequestInfoList(info, 0, 0, ref d);

            this.dLstHistory.DataSource = lst;
            //int index = lst.FindIndex
            //                        (
            //                            delegate(ATTGeneralTippaniRequestInfo i)
            //                            {
            //                                return i.TippaniProcessID == this.ProcessID;
            //                            }
            //                        );
            //this.dLstHistory.SelectedIndex = index;
            this.dLstHistory.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
        public static DataTable GetGeneralTippaniInfo(ATTGeneralTippaniRequestInfo info, int sIndex, int eIndex, ref decimal totalRecord)
        {
            string TempSP  = "select * from VW_TIPPANI_INFO where 1 = 1 ";
            string CountSP = "select count(*) from VW_TIPPANI_INFO where 1 = 1 ";
            string SP      = "";

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

            if (info.OrgID > 0)
            {
                SP = SP + " and emp_org_id = " + info.OrgID;
            }

            if (info.TippaniSubjectID > 0)
            {
                SP = SP + " and tippani_subject_id = " + info.TippaniSubjectID.ToString();
            }

            if (info.FromDate != "")
            {
                SP = SP + " and tippani_on >= :fromdate";
                paramArray.Add(Utilities.GetOraParam(":fromdate", info.FromDate, OracleDbType.Varchar2, ParameterDirection.Input));
            }

            if (info.ToDate != "")
            {
                SP = SP + " and tippani_on <= :todate";
                paramArray.Add(Utilities.GetOraParam(":todate", info.ToDate, OracleDbType.Varchar2, ParameterDirection.Input));
            }

            if (info.TippaniStatusID > 0)
            {
                SP = SP + " and Tippani_status_id = " + info.TippaniStatusID.ToString();
            }

            if (info.ProcessBy != "")
            {
                SP = SP + " AND upper(p_name) LIKE :FName||'%'";
                paramArray.Add(Utilities.GetOraParam(":FName", info.ProcessBy.ToUpper(), OracleDbType.Varchar2, ParameterDirection.Input));
            }

            SP = SP + " order by org_id, tippani_id desc,tippani_on";

            OracleParameter[] param;
            if (paramArray.Count > 0)
            {
                param = paramArray.ToArray();
            }
            else
            {
                param = null;
            }

            GetConnection DBConn = new GetConnection();

            try
            {
                OracleConnection Conn = DBConn.GetDbConn(Module.OAS);
                if (totalRecord > 0)
                {
                    totalRecord = (decimal)SqlHelper.ExecuteScalar(Conn, CommandType.Text, CountSP + SP, param);
                }
                return(SqlHelper.ExecuteDataset(Conn, CommandType.Text, TempSP + SP, sIndex, eIndex, param).Tables[0]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DBConn.CloseDbConn();
            }
        }
    protected void grdRequest_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Cells[0].Visible  = false;
        e.Row.Cells[1].Visible  = false;
        e.Row.Cells[2].Visible  = false;
        e.Row.Cells[3].Visible  = false;
        e.Row.Cells[4].Visible  = false;
        e.Row.Cells[5].Visible  = false;
        e.Row.Cells[6].Visible  = false;
        e.Row.Cells[7].Visible  = false;
        e.Row.Cells[13].Visible = false;
        e.Row.Cells[14].Visible = false; //sender org id
        e.Row.Cells[15].Visible = false; //sender unit id
        e.Row.Cells[18].Visible = false; //receiver org id
        e.Row.Cells[19].Visible = false; //receiver unit id

        if (this.hdnForm.Value == "0")
        {
            e.Row.Cells[16].Visible = true;
            e.Row.Cells[17].Visible = true;
            e.Row.Cells[20].Visible = false;
            e.Row.Cells[21].Visible = false;
        }
        else
        {
            e.Row.Cells[16].Visible = false;
            e.Row.Cells[17].Visible = false;
            e.Row.Cells[20].Visible = true;
            e.Row.Cells[21].Visible = true;
        }

        //e.Row.Cells[15].Visible = false;

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            ATTGeneralTippaniRequestInfo info = (e.Row.DataItem as ATTGeneralTippaniRequestInfo);

            e.Row.ForeColor = BLLTippaniStatus.GetColor(info.TippaniStatusID);
            if (info.TippaniStatusID != 3)
            {
                e.Row.ForeColor = BLLTippaniStatus.GetColor(info.ProcessStatusID);
            }

            if ((e.Row.DataItem as ATTGeneralTippaniRequestInfo).TippaniStatusID == 1)
            {
                e.Row.Cells[12].Text = "Running";
            }
        }

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            info = (ATTGeneralTippaniRequestInfo)e.Row.DataItem;

            if (orgID == info.OrgID && tippaniID == info.TippaniID)
            {
                if (this.grdRequest.Rows[firstRow].Cells[8].RowSpan == 0)
                {
                    this.grdRequest.Rows[firstRow].Cells[8].RowSpan = 2;
                }
                else
                {
                    this.grdRequest.Rows[firstRow].Cells[8].RowSpan += 1;
                }
                e.Row.Cells[8].Visible = false;

                if (this.grdRequest.Rows[firstRow].Cells[12].RowSpan == 0)
                {
                    this.grdRequest.Rows[firstRow].Cells[12].RowSpan = 2;
                }
                else
                {
                    this.grdRequest.Rows[firstRow].Cells[12].RowSpan += 1;
                }
                e.Row.Cells[12].Visible = false;

                if (this.grdRequest.Rows[firstRow].Cells[22].RowSpan == 0)
                {
                    this.grdRequest.Rows[firstRow].Cells[22].RowSpan = 2;
                }
                else
                {
                    this.grdRequest.Rows[firstRow].Cells[22].RowSpan += 1;
                }
                e.Row.Cells[22].Visible = false;
            }
            else //It's a new category
            {
                e.Row.VerticalAlign = VerticalAlign.Middle;

                orgID     = info.OrgID;
                tippaniID = info.TippaniID;
                empID     = dynamicEmpID;

                firstRow = e.Row.RowIndex;
                if (e.Row.RowIndex != 0)
                {
                    foreach (TableCell cell in e.Row.Cells)
                    {
                        cell.Style.Add("border-top", "#4F69A2 1px solid");
                    }
                }
            }
        }
    }
        public static List <ATTGeneralTippaniRequestInfo> GetTippaniRequestInfoList(ATTGeneralTippaniRequestInfo info, int sIndex, int eIndex, ref decimal totalRecord)
        {
            List <ATTGeneralTippaniRequestInfo> lst = new List <ATTGeneralTippaniRequestInfo>();

            try
            {
                DataTable tbl = new DataTable();

                if (info.RequestType == TippaniProcessRequestType.Request)
                {
                    tbl = DLLGeneralTippaniRequestInfo.GetTippaniRequestInfo(info, sIndex, eIndex, ref totalRecord);
                }
                else if (info.RequestType == TippaniProcessRequestType.History)
                {
                    tbl = DLLGeneralTippaniRequestInfo.GetTippaniRequestHistory(info);
                }

                string tippaniList = "";

                foreach (DataRow row in tbl.Rows)
                {
                    ATTGeneralTippaniRequestInfo obj = new ATTGeneralTippaniRequestInfo();

                    obj.OrgID              = int.Parse(row["org_id"].ToString());
                    obj.TippaniID          = int.Parse(row["tippani_id"].ToString());
                    obj.TippaniProcessID   = int.Parse(row["tippani_process_id"].ToString());
                    obj.ProcessByID        = (row["process_by_id"].ToString() == "") ? 0 : double.Parse(row["process_by_id"].ToString());
                    obj.ProcessBy          = row["process_by"].ToString();
                    obj.IsChannelPerson    = row["is_channel_person"].ToString();
                    obj.TippaniSubject     = row["tippani_text"].ToString();
                    obj.ProcessOn          = row["send_on"].ToString();
                    obj.ProcessToID        = double.Parse(row["process_to_id"].ToString());
                    obj.ProcessTo          = row["process_to"].ToString();
                    obj.TippaniSubjectID   = int.Parse(row["tippani_subject_id"].ToString());
                    obj.TippaniSubjectName = row["tippani_subject_name"].ToString();
                    obj.TippaniStatusID    = int.Parse(row["tippani_status_ID"].ToString());
                    obj.TippaniStatusName  = row["tippani_status_Name"].ToString();
                    obj.ProcessStatusID    = (row["process_status_ID"].ToString() == "") ? 0 : int.Parse(row["process_status_ID"].ToString());
                    obj.ProcessStatusName  = row["process_status_Name"].ToString();
                    obj.Note             = row["note"].ToString();
                    obj.SenderOrgID      = (row["sender_org_id"].ToString() == "") ? 0 : int.Parse(row["sender_org_id"].ToString());
                    obj.SenderUnitID     = (row["sender_unit_id"].ToString() == "") ? 0 : int.Parse(row["sender_unit_id"].ToString());
                    obj.SenderOrgName    = row["sender_org_name"].ToString();
                    obj.SenderUnitName   = row["sender_unit_name"].ToString();
                    obj.ReceiverOrgID    = int.Parse(row["receiver_org_id"].ToString());
                    obj.ReceiverUnitID   = int.Parse(row["receiver_unit_id"].ToString());
                    obj.ReceiverOrgName  = row["receiver_org_name"].ToString();
                    obj.ReceiverUnitName = row["receiver_unit_name"].ToString();

                    tippaniList = tippaniList + obj.TippaniID.ToString() + ", ";

                    lst.Add(obj);
                }

                if (info.RequestType == TippaniProcessRequestType.History)
                {
                    ATTGeneralTippaniAttachment infox = new ATTGeneralTippaniAttachment();
                    infox.OrgID     = info.OrgID;
                    infox.TippaniID = info.TippaniID;
                    List <ATTGeneralTippaniAttachment> lstAttachment = BLLGeneralTippaniAttachment.GetAttachment(infox, tippaniList);

                    foreach (ATTGeneralTippaniRequestInfo request in lst)
                    {
                        request.LstAttachment = lstAttachment.FindAll
                                                (
                            delegate(ATTGeneralTippaniAttachment a)
                        {
                            return(a.OrgID == request.OrgID &&
                                   a.TippaniID == request.TippaniID &&
                                   a.TippaniProcessID == request.TippaniProcessID);
                        }
                                                );
                    }
                }

                return(lst);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }