コード例 #1
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            if (hfIsUpdate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("KPIGroupList", "GroupId");
            }
            else
            {
                lngID = Convert.ToInt32(hfId.Value);
            }

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

            objKpi.InsertGroup(objCommonSetup, hfIsUpdate.Value, IsDelete);

            if (hfIsUpdate.Value == "N")
            {
                lblMsg.Text = "Record Saved Successfully";
            }
            else
            {
                lblMsg.Text = "Record Updated Successfully";
            }
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }