protected void RBtnCheckConstr_Click(object sender, EventArgs e)
        {
            bool   ConnectionResult = false;
            string constr           = string.Empty;

            constr           = Convert.ToString(RtxtDatabaseConnection.Text);
            ConnectionResult = DataAccessManager.CheckConnectionstring(constr);
            if (ConnectionResult == false)
            {
                RLChkconstr.ForeColor = System.Drawing.Color.Red;
                RLChkconstr.Text      = "TEST NOT COMPLETED!";
            }
            else
            {
                RLChkconstr.ForeColor = System.Drawing.Color.Green;
                RLChkconstr.Text      = "TEST COMPLETED SUCCESSFULLY!";
            }
        }
        protected void RPbtnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                bool   ConnectionResult = false;
                string constr           = string.Empty;
                constr           = Convert.ToString(RtxtDatabaseConnection.Text);
                ConnectionResult = DataAccessManager.CheckConnectionstring(constr);
                LRRlblCreateCampusResult.Visible = true;

                try
                {
                    string CampusCode = string.Empty, CampusName = string.Empty, DatabaseConnection = string.Empty;

                    CampusCode         = RtxtCampusCode.Text;
                    CampusName         = RtxtCampusName.Text;
                    DatabaseConnection = RtxtDatabaseConnection.Text;
                    string campusstatus = string.Empty;
                    if (RbtnCamousStatus.Checked == true)
                    {
                        campusstatus = "1";
                    }
                    else
                    {
                        campusstatus = "0";
                    }

                    if (RPbtnSave.Text == "Save")
                    {
                        Boolean result = DataAccessManager.InsertCampusMaster(CampusCode, CampusName, DatabaseConnection, string.Empty, campusstatus);
                        if (result == true)
                        {
                            RlblCreateCampusResult.ForeColor = System.Drawing.Color.Green;
                            RlblCreateCampusResult.Text      = "Campus added successfully!";
                            Reset();
                            if (ConnectionResult == false)
                            {
                                RLChkconstr.ForeColor = System.Drawing.Color.Red;
                                RLChkconstr.Text      = "Invalid connection string!";
                            }
                        }
                        else
                        {
                            RlblCreateCampusResult.ForeColor = System.Drawing.Color.Red;
                            RlblCreateCampusResult.Text      = "Operation Failed,Please try again!";
                            if (ConnectionResult == false)
                            {
                                RLChkconstr.ForeColor = System.Drawing.Color.Red;
                                RLChkconstr.Text      = "Invalid connection string!";
                            }
                        }
                    }
                    else if (RPbtnSave.Text == "Update")
                    {
                        Boolean Result   = false;
                        string  CampusID = string.Empty;
                        CampusID = Convert.ToString(ViewState["lbCampusID"]);
                        Result   = DataAccessManager.UpdateCampusMaster(CampusID, CampusCode, CampusName, DatabaseConnection, string.Empty, campusstatus);
                        if (Result == true)
                        {
                            RlblCreateCampusResult.ForeColor = System.Drawing.Color.Green;
                            RlblCreateCampusResult.Text      = "Campus update successfully!";
                            RPbtnSave.Text = "Save";
                            Reset();
                            if (ConnectionResult == false)
                            {
                                RLChkconstr.ForeColor = System.Drawing.Color.Red;
                                RLChkconstr.Text      = "Invalid connection string!";
                            }
                        }
                        else
                        {
                            RlblCreateCampusResult.ForeColor = System.Drawing.Color.Red;
                            RlblCreateCampusResult.Text      = "Operation Failed,Try Again!";
                            if (ConnectionResult == false)
                            {
                                RLChkconstr.ForeColor = System.Drawing.Color.Red;
                                RLChkconstr.Text      = "Invalid connection string!";
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    RlblCreateCampusResult.ForeColor = System.Drawing.Color.Red;
                    RlblCreateCampusResult.Text      = "Error:" + ex.ToString();
                }
            }
        }