示例#1
0
    private void SaveData(string IsDelete)
    {
        try
        {
            if (hfIsUpdate.Value == "Y")
            {
                hfId.Value = hfId.Value;
            }
            else
            {
                hfId.Value = Common.getMaxId("TrainingNeedTier", "TrainingNeedTierID");
            }

            clsCommonSetup objCommonSetup = new clsCommonSetup(hfId.Value.ToString(), txtName.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);

            objEmpMgr.InsertTrainingNeedTier(objCommonSetup, hfIsUpdate.Value, IsDelete);

            lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete);
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }