public DataTable GetDatabyName(BlackBerry BBObj, string mail) { //SametimeServers SametimeObj = new SametimeServers(); DataTable BBTable = new DataTable(); try { if (BBObj.NotesMailAddress == "" || BBObj.NotesMailAddress == null) { string sqlQuery = "Select * from BlackBerry where Name='" + BBObj.Name + "' "; BBTable = objAdaptor.FetchData(sqlQuery); if (BBTable.Rows.Count == 0) { string sqlQuery1 = "Select * from BlackBerry where NotesMailAddress='" + mail + "'"; DataTable BBTable1 = objAdaptor.FetchData(sqlQuery1); return(BBTable1); } else { return(BBTable); } } else { string sqlQuery = "Select * from BlackBerry where Name='" + BBObj.Name + "' and NotesMailAddress<>'" + BBObj.NotesMailAddress + "' "; BBTable = objAdaptor.FetchData(sqlQuery); return(BBTable); } } catch (Exception e) { throw e; } }
public void filldata(string id) { BlackBerry BlackBerryObject = new BlackBerry(); DataTable dt = new DataTable(); BlackBerryObject.NotesMailAddress = Key; dt = VSWebBL.ConfiguratorBL.BlackBerryBL.Ins.gettable(BlackBerryObject); NameTextBox.Text = dt.Rows[0]["Name"].ToString(); EnabledforScanningCheckBox.Checked = Convert.ToBoolean(dt.Rows[0]["Enabled"]); CategoryTextBox.Text = dt.Rows[0]["Category"].ToString(); ScanIntervalTextBox.Text = dt.Rows[0]["ScanInterval"].ToString(); offHoursscanIntervalTextBox.Text = dt.Rows[0]["OffHoursScanInterval"].ToString(); RetryIntervalTextBox.Text = dt.Rows[0]["RetryInterval"].ToString(); // DevicesInternetMailAddressTextBox.Text = dt.Rows[0]["InternetMailAddress"].ToString(); InternetMailAddress.Text = dt.Rows[0]["InternetMailAddress"].ToString(); confserverComboBox.Text = dt.Rows[0]["ConfirmationServer"].ToString(); LookfortheDatabaseTextBox.Text = dt.Rows[0]["ConfirmationDatabase"].ToString(); LookfortheMessageDatabaseTextBox.Text = dt.Rows[0]["DestinationDatabase"].ToString(); TargetserverComboBox.Text = dt.Rows[0]["DestinationServer"].ToString(); DeliveryThresholdTextBox.Text = dt.Rows[0]["DeliveryThreshold"].ToString(); DevicesNotesMailAddressTextBox.Text = dt.Rows[0]["NotesMailAddress"].ToString(); SourceComboBox.Text = dt.Rows[0]["SourceServer"].ToString(); Session["ReturnUrl"] = "BlackBerryDeviceProbe.aspx?NotesMailAddress=" + id + "&tab=1"; }
public DataTable gettable(BlackBerry BlackBerryObject) { try { return(VSWebDAL.ConfiguratorDAL.BlackBerryDAL.Ins.getdatawithId(BlackBerryObject)); } catch (Exception ex) { throw ex; } }
public Object updateBlackBerryDevice(BlackBerry BlackBerryObject, string Hid) { try { return(VSWebDAL.ConfiguratorDAL.BlackBerryDAL.Ins.updatedetails(BlackBerryObject, Hid)); } catch (Exception ex) { throw ex; } }
public Object delete(BlackBerry blackobject) { try { return(VSWebDAL.ConfiguratorDAL.BlackBerryDAL.Ins.delete(blackobject)); } catch (Exception ex) { throw ex; } }
public DataTable GetDatabyName(BlackBerry BBObj, string mail) { try { return(VSWebDAL.ConfiguratorDAL.BlackBerryDAL.Ins.GetDatabyName(BBObj, mail)); } catch (Exception ex) { throw ex; } }
private static BlackBerry GetBlackBerryProxy(int itemId) { Organization org = OrganizationController.GetOrganization(itemId); int serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.BlackBerry); BlackBerry blackBerry = new BlackBerry(); ServiceProviderProxy.Init(blackBerry, serviceId); return(blackBerry); }
protected void BlackBerryDeviceProbegrid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { BlackBerry blackberryobject = new BlackBerry(); blackberryobject.NotesMailAddress = Convert.ToString(e.Keys[0]); Object retval = VSWebBL.ConfiguratorBL.BlackBerryBL.Ins.delete(blackberryobject); ASPxGridView gridView = (ASPxGridView)sender; gridView.CancelEdit(); e.Cancel = true; getdata(); }
public void insertdetailsBlackBerryDevice() { try { BlackBerry bbobj = new BlackBerry(); bbobj.NotesMailAddress = ""; bbobj.Name = NameTextBox.Text; string mail = DevicesNotesMailAddressTextBox.Text; DataTable dt = VSWebBL.ConfiguratorBL.BlackBerryBL.Ins.GetDatabyName(bbobj, mail); if (dt.Rows.Count > 0) { //3/19/2014 NS modified //ErrorMessagePopupControl.ShowOnPageLoad = true; //ErrorMessageLabel.Text = "Name/NotesmailAddress is alredy Exisited. Please enter another Name/Mailaddress"; //10/3/2014 NS modified for VSPLUS-990 errorDiv.InnerHtml = "Name/Notes Mail Address already exists. Please enter another Name/Notes Mail Address." + "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>"; errorDiv.Style.Value = "display: block"; } else { Object insert; insert = VSWebBL.ConfiguratorBL.BlackBerryBL.Ins.insertBlackBerryDeviceProdbegrid(getdata()); SetFocusOnError(insert); if (insert.ToString() == "True") { //3/19/2014 NS modified /* * ErrorMessageLabel.Text = "Data inserted successfully."; * ErrorMessagePopupControl.HeaderText = "Information"; * ErrorMessagePopupControl.ShowCloseButton = false; * ValidationOkButton.Visible = false; * ValidationUpdatedButton.Visible = true; * ErrorMessagePopupControl.ShowOnPageLoad = true; */ Session["BlackberryDeviceUpdateStatus"] = NameTextBox.Text; Response.Redirect("BlackBerryDeviceProbesgrid.aspx", false);//Mukund, 05Aug14, VSPLUS-844:Page redirect on callback Context.ApplicationInstance.CompleteRequest(); } } } catch (Exception ex) { //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw; } }
public Object delete(BlackBerry BlackberryObject) { Object delete; try { string s = "delete BlackBerry where NotesMailAddress='" + BlackberryObject.NotesMailAddress + "'"; delete = objAdaptor.ExecuteNonQuery(s); } catch (Exception e) { throw e; } return(delete); }
public Object validators(BlackBerry BlackBerryObject) { Object returnVal = ""; try { if (BlackBerryObject.Name == null) { return("ER#Please enter the BlackBerry Name"); } if (BlackBerryObject.Category == null) { return("ER#Please Category the BlackBerry"); } if (BlackBerryObject.RetryInterval == null) { return("ER#Please Entry RetryInterval BlackBerry"); } if (BlackBerryObject.ScanInterval == null) { return("ER#Please Entry ScanInterval BlackBerry"); } if (BlackBerryObject.OffHoursScanInterval == null) { return("ER#Please Entry OffHoursScanInterval BlackBerry"); } if (BlackBerryObject.RetryInterval > BlackBerryObject.ScanInterval) { return("ER#Please enter a Retry Interval that is less than the Scan Interval."); } if (BlackBerryObject.ConfirmationServerID == 0) { return("ER#Please Select Source Server."); } if (BlackBerryObject.DestinationServerID == 0) { return("ER#Please Select Target Server."); } } catch (Exception ex) { throw ex; } return(returnVal); }
public Object insertBlackBerryDeviceProdbegrid(BlackBerry BlackBerryObject) { Object returnval = validators(BlackBerryObject); try { if (returnval.ToString() == "") { return(VSWebDAL.ConfiguratorDAL.BlackBerryDAL.Ins.InsertBlackBerry(BlackBerryObject)); } } catch (Exception ex) { throw ex; } return(returnval); }
public DataTable getdatawithId(BlackBerry BlackberryObject) { DataTable dt = new DataTable(); try { string SqlQuery = "select Enabled,Name,NotesMailAddress,Category,ScanInterval,OffHoursScanInterval,DeliveryThreshold" + ",RetryInterval,( Select ServerName from Servers where ID=DestinationServerID) as DestinationServer,DestinationDatabase,InternetMailAddress,NextScan,LastChecked,LastStatus" + ",SourceServer,(Select ServerName from Servers where ID=ConfirmationServerID) as ConfirmationServer ,ConfirmationDatabase from BlackBerry where NotesMailAddress ='" + BlackberryObject.NotesMailAddress + "'"; // string s = "select * from BlackBerry where NotesMailAddress ='" + BlackberryObject.NotesMailAddress+"'"; dt = objAdaptor.FetchData(SqlQuery); } catch (Exception e) { throw e; } return(dt); }
public Object InsertBlackBerry(BlackBerry BlackBerryObject) { Object returnval; try { //string st = "Insert into BlackBerry(Enabled,Name,Category,ScanInterval,OffHoursScanInterval,RetryInterval,DestinationServer,DestinationDatabase,InternetMailAddress,ConfirmationServer,ConfirmationDatabase,NotesMailAddress,SourceServer) values" + // "('" + BlackBerryObject.Enabled + "','" + BlackBerryObject.Name + "','" + BlackBerryObject.Category + "'," + BlackBerryObject.ScanInterval + "," + BlackBerryObject.OffHoursScanInterval + "," + BlackBerryObject.RetryInterval + ",'" + BlackBerryObject.DestinationServer + "','" + BlackBerryObject.DestinationDatabase + "','" + BlackBerryObject.InternetMailAddress + "','" + BlackBerryObject.ConfirmationServer + "','" + BlackBerryObject.ConfirmationDatabase + "','" + BlackBerryObject.NotesMailAddress + "','"+BlackBerryObject.SourceServer+"')"; // returnval = objAdaptor.ExecuteNonQuery(st); string st = "Insert into BlackBerry(Enabled,Name,Category,ScanInterval,OffHoursScanInterval,RetryInterval,DestinationServerID,DestinationDatabase,InternetMailAddress,ConfirmationServerID,ConfirmationDatabase,NotesMailAddress,SourceServer) values" + "('" + BlackBerryObject.Enabled + "','" + BlackBerryObject.Name + "','" + BlackBerryObject.Category + "'," + BlackBerryObject.ScanInterval + "," + BlackBerryObject.OffHoursScanInterval + "," + BlackBerryObject.RetryInterval + ",'" + BlackBerryObject.DestinationServerID + "','" + BlackBerryObject.DestinationDatabase + "','" + BlackBerryObject.InternetMailAddress + "','" + BlackBerryObject.ConfirmationServerID + "','" + BlackBerryObject.ConfirmationDatabase + "','" + BlackBerryObject.NotesMailAddress + "','" + BlackBerryObject.SourceServer + "')"; returnval = objAdaptor.ExecuteNonQuery(st); } catch (Exception e) { throw e; } return(returnval); }
public BlackBerry getdata() { BlackBerry BlackBerryObject = new BlackBerry(); BlackBerryObject.Enabled = Convert.ToBoolean(EnabledforScanningCheckBox.Checked); BlackBerryObject.Name = NameTextBox.Text; BlackBerryObject.Category = CategoryTextBox.Text; BlackBerryObject.OffHoursScanInterval = Convert.ToInt32(offHoursscanIntervalTextBox.Text); BlackBerryObject.RetryInterval = Convert.ToInt32(RetryIntervalTextBox.Text); BlackBerryObject.ScanInterval = Convert.ToInt32(ScanIntervalTextBox.Text); BlackBerryObject.DeliveryThreshold = Convert.ToInt32(DeliveryThresholdTextBox.Text); //BlackBerryObject.DestinationDatabase= BlackBerryObject.NotesMailAddress = DevicesNotesMailAddressTextBox.Text; //BlackBerryObject.InternetMailAddress=DevicesInternetMailAddressTextBox.Text; if (TargetserverComboBox.Value.ToString() != "") { BlackBerryObject.DestinationServerID = int.Parse(TargetserverComboBox.Value.ToString()); } BlackBerryObject.DestinationDatabase = LookfortheMessageDatabaseTextBox.Text; BlackBerryObject.ConfirmationDatabase = LookfortheDatabaseTextBox.Text; //BlackBerryObject.ConfirmationServer = LookfortheserverTextBox.Text; BlackBerryObject.InternetMailAddress = InternetMailAddress.Text; BlackBerryObject.SourceServer = SourceComboBox.Text; if (confserverComboBox.Value.ToString() != "") { BlackBerryObject.ConfirmationServerID = int.Parse(confserverComboBox.Value.ToString()); } if (Mode == "Update") { // BlackBerryObject.NotesMailAddress = Key; NotesMailAddressID.Value = Key; hidevalue = NotesMailAddressID.Value; } return(BlackBerryObject); }
public Object updatedetails(BlackBerry BlackBarryObject, string hidden) { Object updatedetails; try { //string update = "update BlackBerry set Name='" + BlackBarryObject.Name + "',Enabled='" + BlackBarryObject.Enabled + "',Category='" + BlackBarryObject.Category + "'" + // ",ScanInterval=" + BlackBarryObject.ScanInterval + ",OffHoursScanInterval=" + BlackBarryObject.OffHoursScanInterval + ",RetryInterval=" + BlackBarryObject.RetryInterval + "" + // ",ConfirmationServer='" + BlackBarryObject.ConfirmationServer + "',ConfirmationDatabase='" + BlackBarryObject.ConfirmationDatabase + "',DestinationServer='" + BlackBarryObject.DestinationServer + "'" + // ",DestinationDatabase='" + BlackBarryObject.DestinationDatabase + "' where NotesMailAddress='" + hidden + "'"; //updatedetails = objAdaptor.ExecuteNonQuery(update); string update = "update BlackBerry set Name='" + BlackBarryObject.Name + "',Enabled='" + BlackBarryObject.Enabled + "',Category='" + BlackBarryObject.Category + "'" + ",ScanInterval=" + BlackBarryObject.ScanInterval + ",OffHoursScanInterval=" + BlackBarryObject.OffHoursScanInterval + ",RetryInterval=" + BlackBarryObject.RetryInterval + "" + ",ConfirmationServerID='" + BlackBarryObject.ConfirmationServerID + "',ConfirmationDatabase='" + BlackBarryObject.ConfirmationDatabase + "',DestinationServerID='" + BlackBarryObject.DestinationServerID + "'" + ",DestinationDatabase='" + BlackBarryObject.DestinationDatabase + "' where NotesMailAddress='" + hidden + "'"; updatedetails = objAdaptor.ExecuteNonQuery(update); } catch (Exception e) { throw e; } return(updatedetails); }
public bool Matches(BlackBerry.ApplicationDescriptor.Architecture arch) { return (arch == BlackBerry.ApplicationDescriptor.Architecture.ALL || (this == ARM && arch == BlackBerry.ApplicationDescriptor.Architecture.ARM) || (this == X86 && arch == BlackBerry.ApplicationDescriptor.Architecture.X86)); }
public static bool StopEvents(BlackBerry.Screen.ScreenContext context) { if (context == null) { throw new ArgumentNullException("context"); } Util.GetBPSOrException(); return screen_stop_events(context.Handle) == BPS.BPS_SUCCESS; }