protected void grdCommittee_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        List <ATTGeneralTippaniDetail> lst      = this.CommitteeMemberList;
        ATTGeneralTippaniDetail        currentO = lst[e.RowIndex];
        GridViewRow CurrentRow = this.grdCommittee.Rows[e.RowIndex];

        int DelCmdIndex = 2;

        if (currentO.Action == "A")
        {
            this.CommitteeMemberList.RemoveAt(e.RowIndex);
            this.grdCommittee.DataSource = this.CommitteeMemberList;
            this.grdCommittee.DataBind();
        }
        else if (currentO.Action == "N" || currentO.Action == "D" || currentO.Action == "E")
        {
            if (((LinkButton)CurrentRow.Cells[DelCmdIndex].Controls[0]).Text == "Delete")
            {
                lst[e.RowIndex].Action       = "D";
                this.grdCommittee.DataSource = lst;
                this.grdCommittee.DataBind();
            }
            else if (((LinkButton)CurrentRow.Cells[DelCmdIndex].Controls[0]).Text == "Undo")
            {
                lst[e.RowIndex].Action       = "N";
                this.grdCommittee.DataSource = lst;
                this.grdCommittee.DataBind();
            }
        }
    }
    protected void grdAward_SelectedIndexChanged(object sender, EventArgs e)
    {
        ATTGeneralTippaniDetail detail = this.AwardList[this.grdAward.SelectedIndex];

        this.txtAwardDate_Rdt.Text = detail.AwardDate;
        this.txtAward_Rqd.Text     = detail.Award;
        this.txtRemark.Text        = detail.AwardRemark;
    }
Ejemplo n.º 3
0
    protected void grdPunishment_SelectedIndexChanged(object sender, EventArgs e)
    {
        ATTGeneralTippaniDetail detail = this.PunishmentList[this.grdPunishment.SelectedIndex];

        this.txtPunishmentDate_Rdt.Text = detail.PunishmentDate;
        this.txtPunishment_Rqd.Text     = detail.Punishment;
        this.txtRemark.Text             = detail.PunishmentRemark;
    }
    protected void grdLeave_SelectedIndexChanged(object sender, EventArgs e)
    {
        ATTGeneralTippaniDetail detail = this.LeaveList[this.grdLeave.SelectedIndex];

        this.ddlLeaveType_Rqd.SelectedValue = detail.LeaveTypeID.ToString();
        this.txtApplicationDate_Rdt.Text    = detail.ApplicationDate;
        this.txtFromDate_Rdt.Text           = detail.ReqFromDate;
        this.txtToDate_Rdt.Text             = detail.ReqToDate;
        this.txtRemark.Text = detail.ReqReason;
    }
Ejemplo n.º 5
0
    protected void grdTraining_SelectedIndexChanged(object sender, EventArgs e)
    {
        ATTGeneralTippaniDetail detail = this.TrainingList[this.grdTraining.SelectedIndex];

        this.txtSubject_Rqd.Text = detail.TrnSubject;
        this.ddlInstitution_Rqd.SelectedValue = detail.TrnInstitutionID.ToString();
        this.txtFromDate_Rdt.Text             = detail.TrnFromDate;
        this.txtToDate_Rdt.Text = detail.TrnToDate;
        this.txtRemark.Text     = detail.TrnRemark;
    }
Ejemplo n.º 6
0
    protected void grdDeputation_SelectedIndexChanged(object sender, EventArgs e)
    {
        ATTGeneralTippaniDetail detail = this.DeputationList[this.grdDeputation.SelectedIndex];

        this.txtSendDate_Rdt.Text       = detail.DepFromDate;
        this.txtDecisionDate_Rdt.Text   = detail.DepDecisionDate;
        this.ddlOrg_Rqd.SelectedValue   = detail.DepToOrgID.ToString();
        this.txtLeaveDate_Rdt.Text      = detail.DepLeaveDate;
        this.txtResponsibility_Rqd.Text = detail.DepResponsibility;
    }
    protected void grdVisiterDetail_SelectedIndexChanged(object sender, EventArgs e)
    {
        ATTGeneralTippaniDetail detail = this.VisitorList[this.grdVisiterDetail.SelectedIndex];

        this.txtLocation_Rqd.Text         = detail.VisitLocation;
        this.ddlCountry_Rqd.SelectedValue = detail.VisitCountryID.ToString();
        this.txtFromDate_Rdt.Text         = detail.VisitFromDate;
        this.txtToDate_Rdt.Text           = detail.VisitToDate;
        this.txtVehicle_Rqd.Text          = detail.VisitVehicle;
        this.txtSubject_Rqd.Text          = detail.VisitPurpose;
        this.txtRemarks.Text = detail.VisitRemark;
    }
Ejemplo n.º 8
0
        private static List <OracleParameter> GetLeaveLevelSpParameter(ATTGeneralTippaniDetail detail, int tippaniID)
        {
            List <OracleParameter> paramArray = new List <OracleParameter>();

            if (detail.LeaveLevel == LeaveMode.Request)
            {
                paramArray.Add(Utilities.GetOraParam("P_ORG_ID", detail.OrgID, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_TIPPANI_ID", tippaniID, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_EMP_ID", detail.EmpID, OracleDbType.Double, ParameterDirection.Input));
                if (detail.Action != "D")
                {
                    paramArray.Add(Utilities.GetOraParam("P_APPL_DATE", detail.ApplicationDate, OracleDbType.Varchar2, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_LEAVE_TYPE_ID", detail.LeaveTypeID, OracleDbType.Int16, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_REQ_FROM_DATE", detail.ReqFromDate, OracleDbType.Varchar2, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_REQ_TO_DATE", detail.ReqToDate, OracleDbType.Varchar2, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_REQ_NO_OF_DAYS", detail.ReqNoOfDays, OracleDbType.Int16, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_REQ_REASON", detail.ReqReason, OracleDbType.Varchar2, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_LEAVE_ENTRY_BY", detail.LeaveEntryBy, OracleDbType.Varchar2, ParameterDirection.Input));
                    paramArray.Add(Utilities.GetOraParam("P_LEAVE_ENTRY_DATE", detail.LeaveEntryOn, OracleDbType.Date, ParameterDirection.Input));
                }
            }
            else if (detail.LeaveLevel == LeaveMode.Recommend)
            {
                paramArray.Add(Utilities.GetOraParam("P_ORG_ID", detail.OrgID, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_TIPPANI_ID", detail.TippaniID, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_EMP_ID", detail.EmpID, OracleDbType.Double, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_BY", detail.RecBy, OracleDbType.Double, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_DATE", detail.RecDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_FROM_DATE", detail.RecFromDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_TO_DATE", detail.RecToDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_NO_OF_DAYS", detail.RecNoOfDays, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_YES_NO", detail.RecYesNo, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_REC_REASON", detail.RecReason, OracleDbType.Varchar2, ParameterDirection.Input));
            }
            else if (detail.LeaveLevel == LeaveMode.Approve)
            {
                paramArray.Add(Utilities.GetOraParam("P_ORG_ID", detail.OrgID, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_TIPPANI_ID", detail.TippaniID, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_EMP_ID", detail.EmpID, OracleDbType.Double, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_BY", detail.AppBy, OracleDbType.Double, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_DATE", detail.AppDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_FROM_DATE", detail.AppFromDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_TO_DATE", detail.AppToDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_NO_OF_DAYS", detail.AppNoOfDays, OracleDbType.Int16, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_YES_NO", detail.AppYesNo, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam("P_APP_REASON", detail.AppReason, OracleDbType.Varchar2, ParameterDirection.Input));
            }

            return(paramArray);
        }
    protected void grdPostList_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        List <ATTGeneralTippaniDetail> lst      = this.PostingList;
        ATTGeneralTippaniDetail        currentO = lst[e.RowIndex];
        GridView    grd        = this.grdPostList;
        GridViewRow CurrentRow = this.grdPostList.Rows[e.RowIndex];

        int DelCmdIndex = 16;

        if (currentO.Action == "A")
        {
            lst.RemoveAt(e.RowIndex);
            grd.DataSource = this.PostingList;
            grd.DataBind();

            this.CurrentPostList.Add(this.UsedPostList[e.RowIndex]);
            this.UsedPostList.RemoveAt(e.RowIndex);

            this.ddlAvailablePost_Rqd.Items.Clear();
            this.ddlAvailablePost_Rqd.Items.Add(new ListItem("--- छान्नुहोस ---", "0"));
            this.ddlAvailablePost_Rqd.DataSource     = this.CurrentPostList;
            this.ddlAvailablePost_Rqd.DataTextField  = "RDPOSTNAMEWITHCREATIONDATE";//"RDPOSTNAMEWITHCREATIONDATE";
            this.ddlAvailablePost_Rqd.DataValueField = "RDPOSTIDWITHCREATIONDATE";
            this.ddlAvailablePost_Rqd.DataBind();
        }
        else if (currentO.Action == "N" || currentO.Action == "D" || currentO.Action == "E")
        {
            if (((LinkButton)CurrentRow.Cells[DelCmdIndex].Controls[0]).Text == "Delete")
            {
                lst[e.RowIndex].Action = "D";
                grd.DataSource         = lst;
                grd.DataBind();
            }
            else if (((LinkButton)CurrentRow.Cells[DelCmdIndex].Controls[0]).Text == "Undo")
            {
                lst[e.RowIndex].Action = "N";
                grd.DataSource         = lst;
                grd.DataBind();
            }
        }
    }
    protected void btnAddAward_Click(object sender, EventArgs e)
    {
        if (this.ddlLeaveType_Rqd.SelectedIndex <= 0)
        {
            this.lblStatusMessage.Text = "कृपया बिदाको किसिम छन्नुहोस।";
            this.programmaticModalPopup.Show();
            return;
        }

        if (this.txtApplicationDate_Rdt.Text.Trim() == "" || this.txtFromDate_Rdt.Text.Trim() == "" || this.txtToDate_Rdt.Text.Trim() == "")
        {
            this.lblStatusMessage.Text = "कृपया बिदाको मितिहरु राख्नुहोस्।";
            this.programmaticModalPopup.Show();
            return;
        }

        if (string.Compare(this.txtToDate_Rdt.Text.Trim(), this.txtFromDate_Rdt.Text.Trim()) < 0)
        {
            this.lblStatusMessage.Text = "बिदाको अवधि देखि मिति अवधि सम्म मिति भन्दा सानो हुनुपर्छ ।";
            this.programmaticModalPopup.Show();
            return;
        }

        this.ParentRetriveMethod.Invoke();

        if (this.grdLeave.SelectedIndex < 0)
        {
            if (this.EmpID <= 0)
            {
                this.lblStatusMessage.Text = "कृपया कर्मचारी छन्नुहोस।";
                this.programmaticModalPopup.Show();
                return;
            }

            bool existence = this.LeaveList.Exists
                             (
                delegate(ATTGeneralTippaniDetail d)
            {
                return(d.EmpID == this.EmpID);
            }
                             );

            if (existence == true)
            {
                this.lblStatusMessage.Text = "कर्मचारी -> " + this.EmpName + "<br>" + "पहिलेनै छानिसकेकोछ। कृपया अर्को कर्मचारी छान्नुहोस।";
                this.programmaticModalPopup.Show();
                return;
            }
        }

        if (this.grdLeave.SelectedIndex < 0)
        {
            ATTGeneralTippaniDetail det = this.GetLeaveDetail(this.OrgID, this.TippaniID, this.EmpID, this.EntryBy);
            //if (det.ReqNoOfDays > 99) ;
            this.LeaveList.Add(det);
        }
        else
        {
            this.LeaveList[this.grdLeave.SelectedIndex] = this.GetLeaveDetail(this.OrgID, this.TippaniID, this.EmpID, this.EntryBy);
        }

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

        this.ddlLeaveType_Rqd.SelectedIndex = 0;
        this.txtFromDate_Rdt.Text           = "";
        this.txtToDate_Rdt.Text             = "";
        this.txtApplicationDate_Rdt.Text    = "";
        this.txtTotalDays_Rqd.Text          = "0";
        this.txtRemark.Text         = "";
        this.grdLeave.SelectedIndex = -1;
    }