public void SaveAllData(ref UserControlScrapeCommentMessagebyPhotoId obj_UserControlScrapeCommentMessagebyPhotoId) { try { if (ClGlobul.lst_ScrapeCommentMessagePhotoId.Count == 0) { ModernDialog.ShowMessage("Upload Photo Id", "Upload Photo ID", MessageBoxButton.OK); GlobusLogHelper.log.Info("Please Enter Username"); return; } if (obj_UserControlScrapeCommentMessagebyPhotoId.rdoBtn_commentMessage_SingleId.IsChecked == true) { //UsingUsernameManager.UsingUsercontrol_Like_path = string.Empty; // UsingUsernameManager.UsingUsercontrol_Like_single = obj_UserControlScrapeCommentMessagebyPhotoId.txt_UsingUsername_like.Text; } if (obj_UserControlScrapeCommentMessagebyPhotoId.rdoBtn_commentMessage_MultipleId.IsChecked == true) { // UsingUsernameManager.UsingUsercontrol_Like_single = string.Empty; //UsingUsernameManager.UsingUsercontrol_Like_path = obj_UserControlScrapeCommentMessagebyPhotoId.txt_UsingUsername_like.Text; } ScrapeCommentMessage.IsScrapeByPhoto = true; // ScrapeCommentMessage.No_CommentMessageScarpe = Convert.ToInt32(obj_UserControlScrapeCommentMessagebyPhotoId.txtMessage_UsingUsername_NoOfuser.Text); ModernDialog.ShowMessage("Notice", "Data Successfully Save", MessageBoxButton.OK); GlobusLogHelper.log.Info("Your Data Successfully Save"); } catch (Exception ex) { GlobusLogHelper.log.Error("Error:" + ex.StackTrace); } }
private void rdo_UsingPhotoId_ScrapeCommentmessage_Checked(object sender, RoutedEventArgs e) { try { UserControlScrapeCommentMessagebyPhotoId obj_UserControlScrapeCommentMessagebyPhotoId = new UserControlScrapeCommentMessagebyPhotoId(); var window = new ModernDialog { Content = obj_UserControlScrapeCommentMessagebyPhotoId }; window.MinHeight = 300; window.MinWidth = 700; // window.Topmost = true; Button customButton = new Button() { Content = "Save" }; Button customButton1 = new Button() { Content = "Close" }; customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); }; customButton.Click += (sa, pa) => { SaveAllData(ref obj_UserControlScrapeCommentMessagebyPhotoId); window.Close(); }; window.Buttons = new Button[] { customButton, customButton1 }; window.ShowDialog(); string s1 = string.Empty; } catch(Exception ex) { GlobusLogHelper.log.Error("Error:" + ex.StackTrace); } }