public ActionResult CancelLeave(ViewApplyLeave _CancelLeave) { string Message = string.Empty; CommonMessages MessagesObj = new CommonMessages(); _CancelLeave.BusinessId = BusinessId; _CancelLeave.UserId = UserId; if (_CancelLeave.LeaveStatusId == 2) { msg = "Approved"; } if (_CancelLeave.LeaveStatusId == 3) { msg = "Availed"; } if (_CancelLeave.LeaveStatusId == 4) { msg = "Revoke"; } MessagesObj = LMSBAL.CancelLeave(_CancelLeave); if (MessagesObj.Result > 0) { Message = "Leave " + msg + " Successfully"; } else { Message = MessagesObj.Message; } return(Json(Message, JsonRequestBehavior.AllowGet)); }
public void CommonMessage(CommonMessages type, IRocketPlayer Caller) { string message = ""; switch (type) { case CommonMessages.CPlayerNotFound: message = Base.Instance.Translate("player_not_found"); break; case CommonMessages.CInvalidArgs: message = Base.Instance.Translate("unidentified_argument"); break; case CommonMessages.CTooManyArgs: message = Base.Instance.Translate("too_many_arguments"); break; case CommonMessages.CNotEnoughArgs: message = Base.Instance.Translate("not_enough_arguments"); break; case CommonMessages.CNoObjectFound: message = Base.Instance.Translate("no_object_found"); break; default: message = "error"; break; } UnturnedChat.Say(Caller, message); }
public void reoprt2(Literal Literal2, string userid) { DataSet ds = new DataSet(); try { string TopDownline = ""; string strQuery = "SELECT b.UserName,a.my_sponsar_id,c.total_balance,a.userid FROM mlm_login a,mlm_personal_details b,mlm_my_balance c WHERE referral_id='" + userid + "' and a.userid = b.userid and a.userid = c.userid ORDER BY c.total_balance DESC LIMIT 5"; ds = clsOdbc.getDataSet(strQuery); if (ds.Tables[0].Rows.Count != 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string strUserID = ds.Tables[0].Rows[i][3].ToString(); string uname = ds.Tables[0].Rows[i][0] + " " + "(" + ds.Tables[0].Rows[i][1] + ")"; TopDownline = TopDownline + "<tr><td class=\"description\"><img src=../images/billing.png /><a href=view_user_details.aspx?UID=" + strUserID + " target=_blank>" + uname + "</a></td><td style=text-align:left class=\"value\"><span>" + ds.Tables[0].Rows[i][2] + "</span></td></tr>"; } } Literal2.Text = TopDownline; } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message.ToString()); } finally { ds.Dispose(); } }
public WorkerDestination() { try { WorkerLogger.Debug("Start Initializing ZMQ Consumer."); ZMQSubscriber = new ZMQSubscriber(); Dictionary <string, List <string> > DicZMQTopic = new Dictionary <string, List <string> >(); foreach (ZMQPublisherList item in IOHelper.AgentConfig.PublisherList) { DicZMQTopic.Add(item.ZMQAddress, item.TopicList); // WorkerLogger.Control(CommonMessages.ZMQTopicList(item.ZMQAddress, string.Join(",", item.TopicList.ToArray()))); } string strError = string.Empty; ZMQSubscriber.InitialiseMultipleSubscriber(DicZMQTopic, out strError, 100, 1000, IOHelper.AgentConfig.ZMQSecurity); if (!string.IsNullOrEmpty(strError)) { WorkerLogger.Error(CommonMessages.InitializeZMQConnectionFailed(strError)); } else { WorkerLogger.Control(CommonMessages.InitializeZMQConnectionSucc); } // LoadMappingConfig(); } catch (Exception Ex0) { //WorkerLogger.Exception(Ex0); WorkerLogger.TraceLog(MessageType.Error, Ex0.Message); } }
public void reoprt3(Literal Literal3, string userid) { DataSet ds = new DataSet(); try { string TopDownline = ""; string strQuery = "SELECT a.UserName,b.my_sponsar_id,DATE_FORMAT(b.created_on,'%d %b %y') As DOJ,b.userid FROM mlm_personal_details a,mlm_login b WHERE b.referral_id='" + userid + "' and a.userid = b.userid and b.status = 0 LIMIT 5"; ds = clsOdbc.getDataSet(strQuery); if (ds.Tables[0].Rows.Count != 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string strUserID = ds.Tables[0].Rows[i][3].ToString(); string uname = ds.Tables[0].Rows[i][0] + " " + "(" + ds.Tables[0].Rows[i][1] + ")"; TopDownline = TopDownline + "<tr><td class=\"description\"><img src=../images/icons/admission.png /><a href=view_user_details.aspx?UID=" + strUserID + " target=_blank>" + uname + "</a></td><td class=\"value\"><span>" + ds.Tables[0].Rows[i][2] + "</span></td></tr>"; } } Literal3.Text = TopDownline; } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message.ToString()); } finally { ds.Dispose(); } }
protected CreationAuditedCommandHandler( INotificationContext notificationContext, CommonMessages commonMessages, TUnitOfWork uow, ICreationAuditedRepository <TEntity, TEntityKey, TUserKey> repository) : base(notificationContext, commonMessages, uow, repository) { }
protected CrudCommandHandlerBase( INotificationContext notificationContext, CommonMessages commonMessages, IMapper mapper, TUnitOfWork uow, ICrudRepository <TEntity, int> repository) : base(notificationContext, commonMessages, mapper, uow, repository) { }
private void OnCommonMessageHandler(CommonMessages type, object data) { //Debug.Log ("type:" + type); if (type == CommonMessages.SayHello) { scene.text.text = "Total Post:" + data.ToString(); } }
protected CrudCommandHandler( INotificationContext notificationContext, CommonMessages commonMessages, TUnitOfWork uow, ICrudRepository <TEntity, TPrimaryKey> repository) : base(commonMessages, notificationContext, uow) { _repository = repository; _commonMessages = commonMessages; }
public string PurchaseIKeyByCoinpayment(double dblAmount, int IntUserID, int intEpinTypeID, int intEpinCount, double dblEpinPrice, double dblTotPrice) { string status_url = ""; SortedList <string, string> listParam = new SortedList <string, string>(); //add the elements in sortedlist listParam.Add("amount", (dblAmount).ToString()); listParam.Add("currency1", "USD"); listParam.Add("currency2", "BTC"); listParam.Add("address", "37KfikBRm8q9b6efZ5pKbggQeA8pKfvyCc"); listParam.Add("item_name", "A-Code Purchase"); listParam.Add("ipn_url", "https://www.mysuccesswork.com/portal/user/success_bitcoin.aspx"); var ret = new Dictionary <string, object>(); ret = CallAPI("create_transaction", listParam); string error = ret["error"].ToString(); if (error == "ok") { JavaScriptSerializer serializer = new JavaScriptSerializer(); string objectString = serializer.Serialize(ret["result"]); BlogSite bsObj = new BlogSite() { amount = "", txn_id = "", address = "", confirms_needed = "", status_url = "", qrcode_url = "" }; string amount = "", txn_id = "", address = "", confirms_needed = "", qrcode_url = ""; var json = new JavaScriptSerializer().Serialize(ret["result"]); using (var ms = new MemoryStream(Encoding.Unicode.GetBytes(json))) { // Deserialization from JSON DataContractJsonSerializer deserializer = new DataContractJsonSerializer(typeof(BlogSite)); BlogSite bsObj2 = (BlogSite)deserializer.ReadObject(ms); amount = bsObj2.amount; txn_id = bsObj2.txn_id; address = bsObj2.address; confirms_needed = bsObj2.confirms_needed; status_url = bsObj2.status_url; qrcode_url = bsObj2.qrcode_url; } clsWallet objwallet = new clsWallet(); ODBC clsOdbc = new ODBC(); clsOdbc.executeNonQuery("INSERT INTO `mlm_temp_invest_bitcoin`(`userid`, `amount`, `invest_by`, `error`, `btc_amount`, `txn_id`, `address`, `confirms_needed`, `status_url`, `qrcode_url`, `created_on`, epin_type_id, epin_cost, epin_count, total_cost) VALUES (" + IntUserID + ", " + dblAmount + ", " + IntUserID + ", '" + error + "','" + amount + "','" + txn_id + "','" + address + "','" + confirms_needed + "','" + status_url + "','" + qrcode_url + "','" + objwallet.getCurDateTimeString() + "', " + intEpinTypeID + ", " + dblEpinPrice + "," + intEpinCount + ", " + dblTotPrice + " ) "); } CommonMessages.ShowAlertMessage(error.ToString()); return(status_url); }
protected CommandHandlerBase( CommonMessages commonMessages, INotificationContext notificationContext, TUnitOfWork uow) { _uow = uow; _commonMessages = commonMessages; _notificationContext = notificationContext; }
public CreateExampleCommandHandler( NotificationContext notificationContext, CommonMessages commonMessages, IMapper mapper, IApplicationUnitOfWork uow, IExampleRepository exampleRepository) : base(notificationContext, commonMessages, uow) { _mapper = mapper; _exampleRepository = exampleRepository; }
protected void Page_Load(object sender, EventArgs e) { // Response.Redirect("index.aspx"); if (!IsPostBack) { try { if (Session["UserID"] == null) { txtRefID.Text = ""; txtRefID.Enabled = true; } else { txtRefID.Text = objOdbc.executeScalar_str("SELECT my_sponsar_id FROM mlm_login WHERE userid=" + Session["UserID"] + ""); txtRefID_TextChanged(sender, e); txtRefID.Enabled = true; txtRefName.Enabled = false; } int intUserID = 0; string strposition = Request.QueryString["pos"]; string strQueryString = Request.QueryString["pid"]; if (strQueryString != null) { intUserID = Int32.Parse(strQueryString); txtRefID.Text = objOdbc.executeScalar_str("SELECT my_sponsar_id FROM mlm_login where userid=" + strQueryString + ""); txtRefID.Enabled = false; txtRefName.Text = objOdbc.executeScalar_str("SELECT a.username FROM mlm_personal_details a inner join mlm_login b On a.userid = b.userid WHERE b.my_sponsar_id='" + txtRefID.Text + "'"); } if (strposition != null) { if (strposition == "R") { ddlPosition.SelectedValue = "2"; } else if (strposition == "L") { ddlPosition.SelectedValue = "1"; } ddlPosition.Enabled = false; } } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); // CommonMessages.ShowAlertMessage_Reload("Invalid Referral Link", "index.aspx"); } } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { objOdbc.executeNonQuery("INSERT INTO `mlm_contact_us`(`name`, `subject`, `email`, mobile_number, `message`, `created_on`) VALUES ('" + txtName.Text + "','','" + txtEmail.Text + "','" + txtMobile.Text + "','" + txtMessage.Text + "','" + objWallet.getCurDateTimeString() + "')"); CommonMessages.ShowAlertMessage_Reload("We will be contact you very soon!", "index.aspx"); } catch (Exception ex) { } }
public string UploadPhoto(FileUpload FileUpload1) { if (FileUpload1.HasFile) { try { if (FileUpload1.PostedFile.ContentType == "image/jpg" | FileUpload1.PostedFile.ContentType == "image/jpeg" | FileUpload1.PostedFile.ContentType == "image/png" | FileUpload1.PostedFile.ContentType == "image/bmp" | FileUpload1.PostedFile.ContentType == "image/gif") { if (FileUpload1.PostedFile.ContentLength < 3145728) { string strFileName = System.IO.Path.GetFileName(FileUpload1.FileName); DateTime dt = DateTime.Now; string strDate = dt.ToString("dd-MM-yyyy"); strFileName = strFileName.Replace(" ", "_"); string[] strDateSplit = strDate.Split(' '); strDate = strDateSplit[0]; string[] strImgSplit = strFileName.Split('.'); strFileName = strImgSplit[0].ToString() + "_" + strDate + "." + strImgSplit[1]; //FileUpload1.SaveAs(.MapPath("~/Files/") + strFileName); // clsOdbc.executeNonQuery("UPDATE personal_setting SET company_logo='logo/" + strFileName + "'"); //return FileUpload1.FileName; return(strFileName); } else { CommonMessages.ShowAlertMessage("Kindly Upload File less than 3 MB!"); return(null); } return(FileUpload1.FileName); } else { CommonMessages.ShowAlertMessage("Kindly Upload (.jpg,.jpeg,.png,.bmp,gif) File Only!"); return(null); } } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); } return(FileUpload1.FileName); } else { CommonMessages.ShowAlertMessage("Kindly Select File!"); return(null); } }
public static CommonMessages SaveEmployeeLeave(LMS Data) { CommonMessages MessagesObj = new CommonMessages(); try { using (var Cmd = new DBSqlCommand()) { Cmd.AddParameters(Data.UserEmployeeId, CommonConstants.UserEmployeeId, SqlDbType.Int); Cmd.AddParameters(Data.FromDate, CommonConstants.FromDate, SqlDbType.DateTime); Cmd.AddParameters(Data.ToDate, CommonConstants.ToDate, SqlDbType.DateTime); Cmd.AddParameters(Data.LeaveTypeId, CommonConstants.LeaveTypeId, SqlDbType.Int); Cmd.AddParameters(Data.LeaveReasonId, CommonConstants.LeaveReasonId, SqlDbType.Int); Cmd.AddParameters(Data.BusinessId, CommonConstants.BusinessID, SqlDbType.Int); Cmd.AddParameters(Data.CurrentLeaveBalance, CommonConstants.CurrentLeaveBalance, SqlDbType.Int); Cmd.AddParameters(Data.EffectiveLeave, CommonConstants.EffectiveLeave, SqlDbType.Int); Cmd.AddParameters(Data.UserId, CommonConstants.UserId, SqlDbType.Int); Cmd.AddParameters(Data.Description, CommonConstants.Description, SqlDbType.NVarChar); Cmd.AddParameters(Data.FilePath, CommonConstants.FilePath, SqlDbType.NVarChar); //Result = (int)Cmd.ExecuteScalar(SqlProcedures.Insert_EmployeeLeaves); IDataReader ireader = Cmd.ExecuteDataReader(SqlProcedures.Insert_EmployeeLeaves); while (ireader.Read()) { var EmpDet = new CommonMessages { Message = ireader.GetString(CommonColumns.ErrorMessage), Result = ireader.GetInt32(CommonColumns.EmployeeLeaveId), ErrorSeverity = ireader.GetString(CommonColumns.ErrorSeverity), ErrorState = ireader.GetString(CommonColumns.ErrorState) }; MessagesObj = EmpDet; } } return(MessagesObj); } catch (Exception Ex) { MessagesObj.Result = 0; MessagesObj.Message = Ex.Message; MessagesObj.ErrorSeverity = Ex.Message; MessagesObj.ErrorState = Ex.Message; return(MessagesObj); } }
public IssuanceSheetViewModel( IEntityUoWBuilder uowBuilder, IUnitOfWorkFactory unitOfWorkFactory, INavigationManager navigationManager, IValidator validator, ILifetimeScope autofacScope, SizeService sizeService, CommonMessages commonMessages) : base(uowBuilder, unitOfWorkFactory, navigationManager, validator) { this.AutofacScope = autofacScope ?? throw new ArgumentNullException(nameof(autofacScope)); SizeService = sizeService ?? throw new ArgumentNullException(nameof(sizeService)); this.commonMessages = commonMessages; var entryBuilder = new CommonEEVMBuilderFactory <IssuanceSheet>(this, Entity, UoW, navigationManager) { AutofacScope = AutofacScope }; OrganizationEntryViewModel = entryBuilder.ForProperty(x => x.Organization) .UseViewModelJournalAndAutocompleter <OrganizationJournalViewModel>() .UseViewModelDialog <OrganizationViewModel>() .Finish(); SubdivisionEntryViewModel = entryBuilder.ForProperty(x => x.Subdivision) .UseViewModelJournalAndAutocompleter <SubdivisionJournalViewModel>() .UseViewModelDialog <SubdivisionViewModel>() .Finish(); ResponsiblePersonEntryViewModel = entryBuilder.ForProperty(x => x.ResponsiblePerson) .UseViewModelJournalAndAutocompleter <LeadersJournalViewModel>() .UseViewModelDialog <LeadersViewModel>() .Finish(); HeadOfDivisionPersonEntryViewModel = entryBuilder.ForProperty(x => x.HeadOfDivisionPerson) .UseViewModelJournalAndAutocompleter <LeadersJournalViewModel>() .UseViewModelDialog <LeadersViewModel>() .Finish(); Entity.PropertyChanged += Entity_PropertyChanged; NotifyConfiguration.Instance.BatchSubscribeOnEntity <ExpenseItem>(Expense_Changed); NotifyConfiguration.Instance.BatchSubscribeOnEntity <CollectiveExpenseItem>(CollectiveExpense_Changed); if (Entity.Id == 0) { GetDefualtSetting(); } Entity.ObservableItems.ListContentChanged += (sender, args) => OnPropertyChanged(nameof(Sum)); }
protected void btnGetPassword_Click(object sender, EventArgs e) { try { int intCount = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_login WHERE my_sponsar_id ='" + txtUserID.Text + "'"); if (intCount == 1) { int intCount1 = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_login a INNER JOIN mlm_personal_details b ON a.userid=b.userid WHERE a.my_sponsar_id ='" + txtUserID.Text + "' AND b.mobile_number='" + txtMobile.Text + "' "); if (intCount1 == 1) { DataSet ds = new DataSet(); ds = objOdbc.getDataSet("SELECT a.password, a.trans_pwd,b.username, b.email,b.mobile_number FROM mlm_login a, mlm_personal_details b WHERE a.userid=b.userid AND a.my_sponsar_id ='" + txtUserID.Text + "'"); if ((ds.Tables[0].Rows.Count > 0)) { string strUserID = txtUserID.Text; string strPassword = ds.Tables[0].Rows[0][0].ToString(); string strTransPassword = ds.Tables[0].Rows[0][1].ToString(); string strUserName = ds.Tables[0].Rows[0][2].ToString(); string strEmailID = ds.Tables[0].Rows[0][3].ToString(); string strMessage = "Hello " + strUserName + ", Password: "******" Trans. Password: "******", LifeGold.com"; string strNumber = ds.Tables[0].Rows[0][4].ToString(); objComm.SMS_API_for_Single_SMS(strMessage, strNumber); send_mail(); CommonMessages.ShowAlertMessage_Reload("Credentials are sent on your registerd mobile no. and email", "Login.aspx"); } } else { CommonMessages.ShowAlertMessage("Entered UserID does not match with entered mobile no. Please kindly enter registered mobile no.!"); } } else { CommonMessages.ShowAlertMessage("entered UserID does not exist!"); } } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); } }
public CollectiveExpenseViewModel(IEntityUoWBuilder uowBuilder, IUnitOfWorkFactory unitOfWorkFactory, INavigationManager navigation, ILifetimeScope autofacScope, IValidator validator, IUserService userService, UserRepository userRepository, IInteractiveQuestion interactive, StockRepository stockRepository, CommonMessages commonMessages, FeaturesService featuresService, BaseParameters baseParameters ) : base(uowBuilder, unitOfWorkFactory, navigation, validator) { this.autofacScope = autofacScope ?? throw new ArgumentNullException(nameof(autofacScope)); this.userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); this.interactive = interactive; this.commonMessages = commonMessages ?? throw new ArgumentNullException(nameof(commonMessages)); this.featuresService = featuresService ?? throw new ArgumentNullException(nameof(featuresService)); this.baseParameters = baseParameters ?? throw new ArgumentNullException(nameof(baseParameters)); var entryBuilder = new CommonEEVMBuilderFactory <CollectiveExpense>(this, Entity, UoW, navigation, autofacScope); if (UoW.IsNew) { Entity.CreatedbyUser = userService.GetCurrentUser(UoW); } if (Entity.Warehouse == null) { Entity.Warehouse = stockRepository.GetDefaultWarehouse(UoW, featuresService, autofacScope.Resolve <IUserService>().CurrentUserId); } WarehouseEntryViewModel = entryBuilder.ForProperty(x => x.Warehouse).MakeByType().Finish(); var parameter = new TypedParameter(typeof(CollectiveExpenseViewModel), this); CollectiveExpenseItemsViewModel = this.autofacScope.Resolve <CollectiveExpenseItemsViewModel>(parameter); //Переопределяем параметры валидации Validations.Clear(); Validations.Add(new ValidationRequest(Entity, new ValidationContext(Entity, new Dictionary <object, object> { { nameof(BaseParameters), baseParameters } }))); }
public IActionResult Post([FromBody] CommonMessages msg) { if ((msg.Text == null) || (msg.Text == "")) { return(BadRequest()); } User user = Request.GetAuthorizedUser(userRepository); int now = (int)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; CommonMessage message = new CommonMessage { Content = msg.Text, CreateDate = now, Author = user }; commonChatRepository.addMessage(message); _hubContext.Clients.All.BroadcastMessage(message); return(Ok()); }
public string UploadProduct(FileUpload FileUpload1) { if (FileUpload1.HasFile) { try { if (FileUpload1.PostedFile.ContentType == "image/jpg" | FileUpload1.PostedFile.ContentType == "image/jpeg" | FileUpload1.PostedFile.ContentType == "image/png" | FileUpload1.PostedFile.ContentType == "image/bmp" | FileUpload1.PostedFile.ContentType == "image/gif") { if (FileUpload1.PostedFile.ContentLength < 3145728) { string strFileName = System.IO.Path.GetFileName(FileUpload1.FileName); //FileUpload1.SaveAs(.MapPath("~/Files/") + strFileName); // clsOdbc.executeNonQuery("UPDATE personal_setting SET company_logo='logo/" + strFileName + "'"); return(FileUpload1.FileName); } else { CommonMessages.ShowAlertMessage("Kindly Upload File less than 3 MB!"); return(null); } return(FileUpload1.FileName); } else { CommonMessages.ShowAlertMessage("Kindly Upload (.jpg,.jpeg,.png,.bmp,gif) File Only!"); return(null); } } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); } return(FileUpload1.FileName); } else { CommonMessages.ShowAlertMessage("Kindly Select File!"); return(null); } }
public void sendOTPInternational(string strMobile, string strMessage, string strOTP) { string strApi = "http://sms.onefxzone.com/api/sms.php"; string intUid = "6f6e6566787a6f6e6531"; string strpin = "a4e9876dc8e939d22003bb4e3a7fff30"; string strSender = "ONEFXZ"; int intRoute = 13; string sURL; try { sURL = (("" + strApi + "?uid=" + intUid + "&pin=" + strpin + "&sender=" + strSender + "&route=" + intRoute + "&mobile=" + strMobile + "&message=" + strMessage + "&pushid=1")); WebRequest request = default(WebRequest); request = WebRequest.Create(sURL); WebResponse resp = request.GetResponse(); StreamReader reader = new StreamReader(resp.GetResponseStream()); string responseString = reader.ReadToEnd(); reader.Close(); resp.Close(); string[] strSplit = responseString.Split(','); if (strSplit[0] != "0") { clsOdbc.executeNonQuery("insert into mlm_register_otp(mobile_number,otp_password,message,created_on) values('" + strMobile + "','" + strOTP + "','" + strMessage + "','" + DateTime.Now.ToString() + "')"); CommonMessages.ShowAlertMessage("OTP send successfully"); } else { CommonMessages.ShowAlertMessage("Something is wrong"); } } catch (Exception ex) { } }
public void reoprt1(Literal Literal1, string userid) { DataSet ds = new DataSet(); try { int total_downline = 0; string TopDownline = ""; string strQuery = "SELECT a.UserName,b.my_sponsar_id,b.userid,c.total_down_members, a.email, a.mobile_number, a.created_on FROM mlm_login b,mlm_personal_details a,mlm_progress_count c WHERE a.userid=b.userid and b.userid=c.userid and b.referral_id='" + userid + "' LIMIT 5"; ds = clsOdbc.getDataSet(strQuery); if (ds.Tables[0].Rows.Count != 0) { TopDownline = "<table class=\"table\"><thead><tr class=\"text-capitalize\"><th>Member Id</th><th>Member Name</th><th>Mobile</th><th>Email</th><th>Join Date</th></tr></thead><tbody>"; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string strUserID = ds.Tables[0].Rows[i][1].ToString(); string downline1 = ds.Tables[0].Rows[i][3].ToString(); string stremail = ds.Tables[0].Rows[i][4].ToString(); string strmobile = ds.Tables[0].Rows[i][5].ToString(); string strJoin = ds.Tables[0].Rows[i][6].ToString(); //string strMonth = "SELECT Count(*) FROM zs_Offer WHERE MONTHNAME(Created_On)='" + ds.Tables[0].Rows[i][0] + "'"; //alMonthCount.Add(obj.executeScalar_int(strMonth)); string uname = ds.Tables[0].Rows[i][0].ToString(); TopDownline = TopDownline + "<tr><td>" + strUserID + "</td><td>" + uname + "</td><td>" + strmobile + "</td><td>" + stremail + "</td><td>" + strJoin + "</td></tr>"; } TopDownline = TopDownline + "</tbody></table>"; } Literal1.Text = TopDownline; } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message.ToString()); } finally { ds.Dispose(); } }
public static CommonMessages CancelLeave(ViewApplyLeave _CancelLeave) { using (DBSqlCommand cmd = new DBSqlCommand(CommandType.StoredProcedure)) { CommonMessages MessagesObj = new CommonMessages(); try { cmd.AddParameters(_CancelLeave.BusinessId, CommonConstants.BusinessID, SqlDbType.Int); cmd.AddParameters(_CancelLeave.EmployeeLeaveId, CommonConstants.EmployeeLeaveId, SqlDbType.Int); cmd.AddParameters(_CancelLeave.UserEmployeeId, CommonConstants.UserEmployeeId, SqlDbType.BigInt); cmd.AddParameters(_CancelLeave.LeaveStatusId, CommonConstants.LeaveStatusId, SqlDbType.BigInt); IDataReader ireader = cmd.ExecuteDataReader(SqlProcedures.usp_UpdateLeaveStatus); while (ireader.Read()) { var EmpDet = new CommonMessages { Message = ireader.GetString(CommonColumns.ErrorMessage), Result = ireader.GetInt32(CommonColumns.Result), ErrorSeverity = ireader.GetString(CommonColumns.ErrorSeverity), ErrorState = ireader.GetString(CommonColumns.ErrorState) }; MessagesObj = EmpDet; } return(MessagesObj); } catch (Exception ex) { MessagesObj.Result = 0; MessagesObj.Message = ex.Message; MessagesObj.ErrorSeverity = ex.Message; MessagesObj.ErrorState = ex.Message; return(MessagesObj); } } }
protected void txtEpin_TextChanged(object sender, EventArgs e) { if (txtEpin.Text != null) { int intValidEpin = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_epin WHERE epin='" + txtEpin.Text + "' AND status=1"); if (intValidEpin == 1) { txtEpin.BorderColor = System.Drawing.Color.Green; txtEpin.Enabled = false; btnRegister.Enabled = true; } else { txtEpin.Text = ""; txtEpin.Attributes.Add("placeholder", "Enter valid Epin!"); txtEpin.BorderColor = System.Drawing.Color.Red; btnRegister.Enabled = false; } } else { CommonMessages.ShowAlertMessage("Enter Valid Epin!"); } }
public void sendMailSendGrid(string strMailTO, string strToName, string strMailFrom, string strFromName, string strSubject, string strMessage) { try { MailMessage mailMsg = new MailMessage(); mailMsg.To.Add(new MailAddress(strMailTO, strToName)); mailMsg.From = new MailAddress(strMailFrom, strFromName); mailMsg.Subject = strSubject; string text = @strMessage; string html = @strMessage; mailMsg.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(text, null, MediaTypeNames.Text.Plain)); mailMsg.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(html, null, MediaTypeNames.Text.Html)); SmtpClient smtpClient = new SmtpClient("69.30.198.45", Convert.ToInt32(25)); System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("*****@*****.**", "123@123ABC"); smtpClient.Credentials = credentials; smtpClient.Send(mailMsg); } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); } }
protected void btnLogin_Click(object sender, EventArgs e) { string strQuery1 = null; string strQuery2 = null; string strUserID = null; string strUserTypeID = null; string strDateTime = string.Empty; clsEpin objEpin = new clsEpin(); clsWallet objWallet = new clsWallet(); strDateTime = objWallet.getCurDateTimeString(); // if (ctrlGoogleReCaptcha.Validate()) // { strQuery1 = "SELECT count(1) From mlm_login where status = 1 and my_sponsar_id='" + clsOdbc.GetStringForSQL(txtUserID.Text) + "' and password='******'"; int intCount = clsOdbc.executeScalar_int(strQuery1); if (intCount > 0) { System.Data.DataSet ds = new System.Data.DataSet(); strQuery2 = "SELECT a.userid,a.UserTypeId From mlm_login a Where a.status = 1 and a.my_sponsar_id='" + clsOdbc.GetStringForSQL(txtUserID.Text) + "' and a.password='******'"; try { ds = clsOdbc.getDataSet(strQuery2); if (ds.Tables[0].Rows.Count > 0) { strUserID = ds.Tables[0].Rows[0][0].ToString(); strUserTypeID = ds.Tables[0].Rows[0][1].ToString(); string strIPAddress = Request.ServerVariables["REMOTE_ADDR"]; objother.AddLoginHistory(Int32.Parse(strUserID), strIPAddress); if (strUserTypeID == "1") { Session["AdminID"] = strUserID; Response.Redirect("portal/admin/dashboard.aspx"); } else if (strUserTypeID == "2") { Session["UserID"] = strUserID; Response.Redirect("portal/member/overview.aspx"); } } } catch (Exception ex) { } finally { ds.Dispose(); } } else { CommonMessages.ShowAlertMessage("Entered username or Password is Wrong!"); } /* } * else * { * CommonMessages.ShowAlertMessage("Select Captcha!"); * }*/ }
protected void btnRegister_Click(object sender, EventArgs e) { //txtEpin_TextChanged(sender, e); btnRegister.Enabled = false; try { int intPANCount = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_personal_details WHERE pancard = '" + txtPAN.Text + "'"); if (intPANCount < 3) { int intUserNameCount = 0; // objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_personal_details WHERE username = '******'"); //username condition removed on 25 apr on call if (intUserNameCount == 0) { if (txtEpin.Text != "") { int intValidEpin = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_epin WHERE epin='" + txtEpin.Text + "' AND status=1"); if (intValidEpin == 1) { string strQuery = "CALL addRegister_new('" + txtRefID.Text + "','" + txtUserName.Text + "','" + txtMobileNo.Text + "', '" + txtEmail.Text + "',2,'" + ddlPosition.SelectedValue + "', '1', '1','1','','" + txtPAN.Text + "')"; int intUserID = objOdbc.executeScalar_int(strQuery); Session["EPIN"] = txtEpin.Text; Session["WelcomeID"] = intUserID; btnRegister.Enabled = false; Response.Redirect("Welcome.aspx"); } else { txtEpin.Text = ""; txtEpin.Attributes.Add("placeholder", "Enter valid Epin!"); txtEpin.BorderColor = System.Drawing.Color.Red; btnRegister.Enabled = false; } } else { lblError.Text = "Please Enter E-Pin!"; txtEpin.Text = ""; txtEpin.Focus(); } } else { lblError.Text = "This User Name already registered!"; txtUserName.Text = ""; txtUserName.Focus(); } } else { lblError.Text = "This PAN number already registered!"; txtPAN.Text = ""; txtPAN.Focus(); } } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); } }
private void OnCommonMessageHandler(CommonMessages type, object data) { Debug.Log("type:" + type); }
public void RegisterWithApiHandler(BloomApiHandler apiHandler) { apiHandler.RegisterEndpointLegacy("uiLanguages", HandleUiLanguages, false); // App apiHandler.RegisterEndpointLegacy("currentUiLanguage", HandleCurrentUiLanguage, false); // App apiHandler.RegisterEndpointLegacy("bubbleLanguages", HandleBubbleLanguages, false); // Move to EditingViewApi apiHandler.RegisterEndpointLegacy("authorMode", HandleAuthorMode, false); // Move to EditingViewApi apiHandler.RegisterEndpointLegacy("topics", HandleTopics, false); // Move to EditingViewApi apiHandler.RegisterEndpointLegacy("common/error", HandleJavascriptError, false); // Common apiHandler.RegisterEndpointLegacy("common/preliminaryError", HandlePreliminaryJavascriptError, false); // Common apiHandler.RegisterEndpointLegacy("common/saveChangesAndRethinkPageEvent", RethinkPageAndReloadIt, true); // Move to EditingViewApi apiHandler.RegisterEndpointLegacy("common/chooseFolder", HandleChooseFolder, true); apiHandler.RegisterEndpointLegacy("common/showInFolder", HandleShowInFolderRequest, true); // Common apiHandler.RegisterEndpointLegacy("common/canModifyCurrentBook", HandleCanModifyCurrentBook, true); apiHandler.RegisterEndpointLegacy("common/showSettingsDialog", HandleShowSettingsDialog, false); // Common apiHandler.RegisterEndpointLegacy("common/problemWithBookMessage", request => { request.ReplyWithText(CommonMessages.GetProblemWithBookMessage(Path.GetFileName(_bookSelection.CurrentSelection?.FolderPath))); }, false); apiHandler.RegisterEndpointLegacy("common/clickHereForHelp", request => { var problemFilePath = UrlPathString.CreateFromUrlEncodedString(request.RequiredParam("problem")).NotEncoded; request.ReplyWithText(CommonMessages.GetPleaseClickHereForHelpMessage(problemFilePath)); }, false); // Used when something in JS land wants to copy text to or from the clipboard. For POST, the text to be put on the // clipboard is passed as the 'text' property of a JSON requestData. // Somehow the get version of this fires while initializing a page (probably hooking up CkEditor, an unwanted // invocation of the code that decides whether to enable the paste hyperlink button). This causes a deadlock // unless we make this endpoint requiresSync:false. I think this is safe as it doesn't interact with any other // Bloom objects. apiHandler.RegisterEndpointLegacy("common/clipboardText", request => { if (request.HttpMethod == HttpMethods.Get) { string result = ""; // initial value is not used, delegate will set it. Program.MainContext.Send(o => { try { result = PortableClipboard.GetText(); } catch (Exception e) { // Need to make sure to handle exceptions. // If the worker thread dies with an unhandled exception, // it causes the whole program to immediately crash without opportunity for error reporting NonFatalProblem.Report(ModalIf.All, PassiveIf.None, "Error pasting text", exception: e); } }, null); request.ReplyWithText(result); } else { // post var requestData = DynamicJson.Parse(request.RequiredPostJson()); string content = requestData.text; if (!string.IsNullOrEmpty(content)) { Program.MainContext.Post(o => { try { PortableClipboard.SetText(content); } catch (Exception e) { // Need to make sure to handle exceptions. // If the worker thread dies with an unhandled exception, // it causes the whole program to immediately crash without opportunity for error reporting NonFatalProblem.Report(ModalIf.All, PassiveIf.None, "Error copying text", exception: e); } }, null); } request.PostSucceeded(); } }, false, false); apiHandler.RegisterEndpointLegacy("common/checkForUpdates", request => { WorkspaceView.CheckForUpdates(); request.PostSucceeded(); }, false); apiHandler.RegisterEndpointLegacy("common/channel", request => { request.ReplyWithText(ApplicationUpdateSupport.ChannelName); }, false); // This is useful for debugging TypeScript code, especially on Linux. I wouldn't necessarily expect // to see it used anywhere in code that gets submitted and merged. apiHandler.RegisterEndpointLegacy("common/debugMessage", request => { var message = request.RequiredPostString(); Debug.WriteLine("FROM JS: " + message); request.PostSucceeded(); }, false); apiHandler.RegisterEndpointLegacy("common/loginData", request => { var requestData = DynamicJson.Parse(request.RequiredPostJson()); string token = requestData.sessionToken; string email = requestData.email; string userId = requestData.userId; //Debug.WriteLine("Got login data " + email + " with token " + token + " and id " + userId); _parseClient.SetLoginData(email, userId, token, BookUpload.Destination); _doWhenLoggedIn?.Invoke(); request.PostSucceeded(); }, false); // At this point we open dialogs from c# code; if we opened dialogs from javascript, we wouldn't need this // api to do it. We just need a way to close a c#-opened dialog from javascript (e.g. the Close button of the dialog). // // This must set requiresSync:false because the API call which opened the dialog may already have // the lock in which case we would be deadlocked. // ErrorReport.NotifyUserOfProblem is a particularly problematic case. We tried to come up with some // other solutions for that including opening the dialog on Application.Idle. But the dialog needs // to give a real-time result so callers can know what do with button presses. Since some of those // callers are in libpalaso, we can't just ignore the result and handle the actions ourselves. apiHandler.RegisterEndpointLegacy("common/closeReactDialog", request => { ReactDialog.CloseCurrentModal(request.GetPostStringOrNull()); request.PostSucceeded(); }, true, requiresSync: false); // TODO: move to the new App API (BL-9635) apiHandler.RegisterEndpointLegacy("common/reloadCollection", HandleReloadCollection, true); }