예제 #1
0
 public static void Update(TMSPrivacySettings tMSPrivacySettings)
 {
     tMSPrivacySettings.Update();
 }
예제 #2
0
 public static void Update(TMSPrivacySettings tMSPrivacySettings, DbTransaction transaction)
 {
     tMSPrivacySettings.Update(transaction);
 }
예제 #3
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         string Image     = null;
         string Contact   = null;
         string Education = null;
         string Location  = null;
         if (rdbLocationOne.Checked == true)
         {
             Location = "Yes";
         }
         if (rdbLocationTwo.Checked == true)
         {
             Location = "No";
         }
         if (rdbPhotoOne.Checked == true)
         {
             Image = "Yes";
         }
         if (rdbPhotoTwo.Checked == true)
         {
             Image = "No";
         }
         if (rdbEducatioOne.Checked == true)
         {
             Education = "Yes";
         }
         if (rdbEducatioTwo.Checked == true)
         {
             Education = "No";
         }
         if (rdbContactOne.Checked == true)
         {
             Contact = "Yes";
         }
         if (rdbContactTwo.Checked == true)
         {
             Contact = "No";
         }
         if (ViewState["PrivacySettingsId"] != null)
         {
             TMSPrivacySettings objPrivacy = TMSPrivacySettings.Get(Convert.ToInt64(ViewState["PrivacySettingsId"]));
             if (objPrivacy != null)
             {
                 objPrivacy.PSDisplayLocation       = Location;
                 objPrivacy.PSDisplayPhoto          = Image;
                 objPrivacy.PSDisplayEducation      = Education;
                 objPrivacy.PSDisplayConatctDetails = Contact;
                 objPrivacy.PSDate = DateTime.Now;
                 objPrivacy.Update();
                 Response.Redirect("PrivacySettings.aspx?msg=Privacy Settings Updated Successfully...!!");
             }
         }
         else
         {
             TMSPrivacySettings objPrivacy = new TMSPrivacySettings();
             objPrivacy.PSFacultyLoginId        = Convert.ToInt64(Session["UserId"]);
             objPrivacy.PSFacultyType           = "Principal";
             objPrivacy.PSFacultyTypeId         = 1;
             objPrivacy.PSDisplayLocation       = Location;
             objPrivacy.PSDisplayPhoto          = Image;
             objPrivacy.PSDisplayEducation      = Education;
             objPrivacy.PSDisplayConatctDetails = Contact;
             objPrivacy.PSDate   = DateTime.Now;
             objPrivacy.PSStatus = 1;
             objPrivacy.Insert();
             Response.Redirect("PrivacySettings.aspx?msg=Privacy Settings Added Successfully...!!");
         }
     }
     catch (Exception ex) { }
 }