protected void btnupdateRollOutPlan_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 changeid = Convert.ToInt32(Request.QueryString[0]);

            #region For updating values in Problem history table
            ObjChangeHistory.Changeid = changeid;

            MembershipUser User = Membership.GetUser();
            string username = User.UserName.ToString();
            Objorganization = Objorganization.Get_Organization();
            int userid = ObjUser.Get_By_UserName(username, Objorganization.Orgid);
            ObjChangeHistory.Operationownerid = userid;
            ObjChangeHistory.Operation = "RollOutPlanUpdated";
            ObjChangeHistory.Insert();
            #endregion
            #region Get the Current historyid by calling function Get_Current_ProblemHistoryid()

            historyid = ObjChangeHistory.Get_Current_ChangeHistoryid();
            #endregion
            #region Find Current value of Problem aBy Calling Function Get_By_id(),via passing problemid

            ObjChange = ObjChange.Get_By_id(changeid);

            #endregion
            #region Find the value of current symptom
            ObjChangeRollOutPlan = ObjChangeRollOutPlan.Get_By_id(ObjChange.Changeid);

            #endregion
            #region Insert the values in history difference table
            prev_value = Convert.ToString(ObjChangeRollOutPlan.Description);
            curnt_value = Convert.ToString(EditorRollOutPlan.Text);
            ObjChangeHistoryDiff.Historyid = historyid;
            ObjChangeHistoryDiff.Columnname = "Description";
            ObjChangeHistoryDiff.Current_value = curnt_value;
            ObjChangeHistoryDiff.Prev_value = prev_value;
            ObjChangeHistoryDiff.Insert();
            #endregion
            ObjChangeRollOutPlan.Changeid = changeid;
            ObjChangeRollOutPlan.Description = EditorRollOutPlan.Text.ToString();
            ObjChangeRollOutPlan.Update();
            ShowRollOutPlanPlaceholder();
            btnupdateRollOutPlan.Visible = false;
            btnsaveRollOutPlan.Visible = false;
            btncancellRollOutPlan.Visible = false;
            EditorRollOutPlan.Visible = false;
            lnkRollOutPlanedit.Visible = true;

            lnkRollOutPlanadd.Visible = false;
            ShowImpactPlaceholder();
            ShowBackOutPlanPlaceholder();

        }
        catch (Exception ex)
        {
            string myScript;
            myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
            Page.RegisterClientScriptBlock("MyScript", myScript);
            return;
        }
    }
    protected void btnupdateRollOutPlan_Click(object sender, EventArgs e)
    {
        string prev_value;
        string curnt_value;
        int historyid;
        int changeid = Convert.ToInt16(Request.QueryString[0]);

        #region For updating values in Problem history table
        ObjChangeHistory.Changeid = changeid;

        MembershipUser User = Membership.GetUser();
        string username = User.UserName.ToString();
        Objorganization = Objorganization.Get_Organization();
        int userid = ObjUser.Get_By_UserName(username, Objorganization.Orgid);
        ObjChangeHistory.Operationownerid = userid;
        ObjChangeHistory.Operation = "RollOutPlanUpdated";
        ObjChangeHistory.Insert();
        #endregion
        #region Get the Current historyid by calling function Get_Current_ProblemHistoryid()

        historyid = ObjChangeHistory.Get_Current_ChangeHistoryid();
        #endregion
        #region Find Current value of Problem aBy Calling Function Get_By_id(),via passing problemid

        ObjChange = ObjChange.Get_By_id(changeid);

        #endregion
        #region Find the value of current symptom
        ObjChangeRollOutPlan = ObjChangeRollOutPlan.Get_By_id(ObjChange.Changeid);

        #endregion
        #region Insert the values in history difference table
        prev_value = Convert.ToString(ObjChangeRollOutPlan.Description);
        curnt_value = Convert.ToString(EditorRollOutPlan.Text);
        ObjChangeHistoryDiff.Historyid = historyid;
        ObjChangeHistoryDiff.Columnname = "Description";
        ObjChangeHistoryDiff.Current_value = curnt_value;
        ObjChangeHistoryDiff.Prev_value = prev_value;
        ObjChangeHistoryDiff.Insert();
        #endregion
        ObjChangeRollOutPlan.Changeid = changeid;
        ObjChangeRollOutPlan.Description = EditorRollOutPlan.Text.ToString();
        ObjChangeRollOutPlan.Update();
        ShowRollOutPlanPlaceholder();
        btnupdateRollOutPlan.Visible = false;
        btnsaveRollOutPlan.Visible = false;
        btncancellRollOutPlan.Visible = false;
        EditorRollOutPlan.Visible = false;
        lnkRollOutPlanedit.Visible = true;

        lnkRollOutPlanadd.Visible = false;
        ShowImpactPlaceholder();
        ShowBackOutPlanPlaceholder();
    }
 public int Insert_ChangeRollOut_mst(ChangeRollOut ObjChangeRollOut)
 {
     return (int)ExecuteNonQuery(Sp_ChangeRollOut_Insert, new object[] { ObjChangeRollOut.Changeid, ObjChangeRollOut.Description });
 }
 public int Update_ChangeRollOut_By_id(ChangeRollOut ObjChangeRollOut)
 {
     return (int)ExecuteNonQuery(Sp_ChangeRollOut_Update, new object[] { ObjChangeRollOut.Changeid, ObjChangeRollOut.Description });
 }
    public object GenerateChangeRollOut_mstObject(ref IDataReader returnData)
    {
        ChangeRollOut obj = new ChangeRollOut();
        while (returnData.Read())
        {
            obj.Changeid = (int)returnData["Changeid"];

            obj.Rolloutid = (int)returnData["Rolloutid"];

            if (returnData["Description"] != DBNull.Value)
            {

                obj.Description = (string)returnData["Description"];
            }

        }
        returnData.Close();
        returnData.Dispose();
        return obj;
    }