Ejemplo n.º 1
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            string EmpID = Session["EMPLOYEEID"].ToString();

            string strMonth = Convert.ToString(DateTime.Today.Month);
            string strYear  = Convert.ToString(DateTime.Today.Year);

            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), "", "Y", "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N");

            objPayRptMgr.UpdateAttandance(objCommonSetup, this.ddlRemarksType.SelectedItem.Value.ToString(), this.txtRemarks.Text.ToString(),
                                          this.txtFromDate.Text.ToString(), this.txtToDate.Text.ToString(), EmpID);

            objTSM.GenerateTimeSheet(EmpID, strMonth, strYear, Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()));

            this.UpdateFoxpro();

            lblMsg.Text = Common.GetMessage("Y", IsDelete);

            Common.EmptyTextBoxValues(this);
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
    protected void btnGenerate_Click(object sender, EventArgs e)
    {
        objTSMgr.GenerateTimeSheet(ddlEmployee.SelectedValue.Trim(), ddlMonth.SelectedValue.Trim(),
                                   ddlYear.SelectedValue.Trim(), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()));

        lblMsg.Text = "Time Sheet has been regenerated for " + ddlMonth.SelectedItem.ToString() + ", " + ddlYear.SelectedItem.ToString();
    }