Example #1
0
    protected void SaveData(string IsDelete)
    {
        string strID = "";

        try
        {
            if (ddlSalHead.SelectedValue.ToString() != "19")
            {
                objVarMgr.InsertData(grPayroll, strID, ddlSalHead.SelectedValue.ToString(),
                                     ddlMonth.SelectedValue.Trim(), ddlYear.SelectedValue.Trim(), "Y", "N", Session["USERID"].ToString(),
                                     Common.SetDateTime(DateTime.Now.ToString()), "");
            }
            else
            {
                objVarMgr.InsertBonusAllowanceData(grPayroll, "36", "",
                                                   ddlMonth.SelectedValue.ToString(), ddlYear.SelectedValue.ToString(), Common.SetDateTime(DateTime.Now.ToString()),
                                                   "19", Session["USERID"].ToString().Trim(), Common.SetDateTime(DateTime.Now.ToString()), "");
            }

            this.EntryMode(false);
            lblMsg.Text = "Record Saved Successfully";
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }