protected void btnupdatesymptom_Click(object sender, EventArgs e)
    {
        string prev_value;
        string curnt_value;
        int historyid;
        int problemid = Convert.ToInt16(Request.QueryString[0]);

        #region For updating values in Problem history table
        ObjProblemHistory.Problemid = problemid;
        MembershipUser User=Membership.GetUser();
        string username=User.UserName.ToString();
        Objorganization=Objorganization.Get_Organization();
        int userid = ObjUser.Get_By_UserName(username, Objorganization.Orgid);
        ObjProblemHistory.Operationownerid = userid;
        ObjProblemHistory.Operation = "SymptomUpdate";
        ObjProblemHistory.Insert();
        #endregion
        #region Get the Current historyid by calling function Get_Current_ProblemHistoryid()
        historyid = ObjProblemHistory.Get_Current_ProblemHistoryid();
        #endregion
        #region Find Current value of Problem aBy Calling Function Get_By_id(),via passing problemid
        ObjProblem = ObjProblem.Get_By_id(problemid);

        #endregion
        #region Find the value of current symptom
        ObjProblemSymptom = ObjProblemSymptom.Get_By_id(ObjProblem.ProblemId);

        #endregion
        #region Insert the values in history difference table
        prev_value = Convert.ToString(ObjProblemSymptom.Description);
        curnt_value = Convert.ToString(Editorsymptom.Text);
        ObjProblemHistoryDiff.Historyid = historyid;
        ObjProblemHistoryDiff.Columnname = "Description";
        ObjProblemHistoryDiff.Current_value = curnt_value;
        ObjProblemHistoryDiff.Prev_value = prev_value;
        ObjProblemHistoryDiff.Insert();
        #endregion
        ObjProblemSymptom.Problemid = problemid;
        ObjProblemSymptom.Description = Editorsymptom.Text.ToString();
        ObjProblemSymptom.Update();
        ShowSymptomPlaceholder();
        btnupdatesymptom.Visible = false;
        btncancellSymptom.Visible = false;
        btncancellSymptom.Visible = false;
        Editorsymptom.Visible = false;
        lnksymptomadd.Visible = false;
        lnksymptomedit.Visible = true;
        ShowImpactPlaceholder();
        ShowRootcausePlaceholder();
    }
    protected void btnupdatesymptom_Click(object sender, EventArgs e)
    {
        //Add Exception handilng try catch change by vishal 21-05-2012
        try
        {
            string prev_value;
            string curnt_value;
            int historyid;
            int problemid = Convert.ToInt32(Request.QueryString[0]);

            #region For updating values in Problem history table
            ObjProblemHistory.Problemid = problemid;
            MembershipUser User = Membership.GetUser();
            string username = User.UserName.ToString();
            Objorganization = Objorganization.Get_Organization();
            int userid = ObjUser.Get_By_UserName(username, Objorganization.Orgid);
            ObjProblemHistory.Operationownerid = userid;
            ObjProblemHistory.Operation = "SymptomUpdate";
            ObjProblemHistory.Insert();
            #endregion
            #region Get the Current historyid by calling function Get_Current_ProblemHistoryid()
            historyid = ObjProblemHistory.Get_Current_ProblemHistoryid();
            #endregion
            #region Find Current value of Problem aBy Calling Function Get_By_id(),via passing problemid
            ObjProblem = ObjProblem.Get_By_id(problemid);

            #endregion
            #region Find the value of current symptom
            ObjProblemSymptom = ObjProblemSymptom.Get_By_id(ObjProblem.ProblemId);

            #endregion
            #region Insert the values in history difference table
            prev_value = Convert.ToString(ObjProblemSymptom.Description);
            curnt_value = Convert.ToString(Editorsymptom.Text);
            ObjProblemHistoryDiff.Historyid = historyid;
            ObjProblemHistoryDiff.Columnname = "Description";
            ObjProblemHistoryDiff.Current_value = curnt_value;
            ObjProblemHistoryDiff.Prev_value = prev_value;
            ObjProblemHistoryDiff.Insert();
            #endregion
            ObjProblemSymptom.Problemid = problemid;
            ObjProblemSymptom.Description = Editorsymptom.Text.ToString();
            ObjProblemSymptom.Update();
            ShowSymptomPlaceholder();
            btnupdatesymptom.Visible = false;
            btncancellSymptom.Visible = false;
            btncancellSymptom.Visible = false;
            Editorsymptom.Visible = false;
            lnksymptomadd.Visible = false;
            lnksymptomedit.Visible = true;
            ShowImpactPlaceholder();
            ShowRootcausePlaceholder();

        }
        catch (Exception ex)
        {
            string myScript;
            myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
            Page.RegisterClientScriptBlock("MyScript", myScript);
            return;
        }
    }