protected void btnRegister_Click(object sender, EventArgs e) { if (Validate()) { Hashtable tbIn = new Hashtable(); tbIn.Add("Member_Status", "1"); tbIn.Add("Member_Phone", phone.Text); tbIn.Add("Member_Email", email.Text); tbIn.Add("Member_Password", ApplicationUtil.PasswordEncrypt(CMSfunc._Replate(password.Text))); var res = UpdateData.Insert("tbl_Member", tbIn); if (res) { dvsuccess.Visible = true; lbError.Text = "Đăng ký thành công! Bạn có thể <a href='/login.htm' class='text-bold'>Đăng nhập.</a>"; string fromEmail = email.Text; string toEmail = email.Text; string Name = CMSfunc._GetConst("_Name"); string Subject = "ĐĂNG KÝ TÀI KHOẢN THÀNH CÔNG TẠI " + CMSfunc._GetConst("_Domain"); string Host = CMSfunc._GetConst("_Hostmail"); string EmailClient = CMSfunc._GetConst("_EmailClient"); string PassEmailClient = CMSfunc._GetConst("_PassEmailClient"); int Port = Convert.ToInt32(CMSfunc._GetConst("_Port")); string strBody = "<html><body><p><b>Quý khách đăng ký thành công tài khoản tại website " + CMSfunc._GetConst("_Domain") + "</b></p><p><b>Thông tin tài khoản: </b></p><p> + Số điện thoại: " + phone.Text + "</p><p> + Mật khẩu: " + password.Text + "</p><p>Quý khách vui lòng truy cập " + CMSfunc._GetConst("_Domain") + " chọn Đăng nhập để đặt vé xe điện tử. <br>Cảm ơn quý khách đã sử dụng dịch vụ của chúng tôi.</p></body></html>"; try { bool _isSend = SendMailClient.SendGMail(toEmail, fromEmail, Name, "", Subject, Host, Port, EmailClient, PassEmailClient, "Xác thực thành công", strBody); } catch (Exception ex) { throw new Exception(ex.Message); } } } }
public event_dlgVerificaPendenciaPayFone(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgVerificaPendenciaPayFone(this); }
protected override void OnDragDrop(DragEventArgs drgevent) { base.OnDragDrop(drgevent); if (DesignView.Context == null) { return; } if (m_ghosts.Count > 0) { foreach (DomNode ghost in m_ghosts) { ghost.RemoveFromParent(); } var dragDropTarget = TargetGame(); ApplicationUtil.Insert( dragDropTarget, dragDropTarget, m_ghosts, "Drag and Drop", null); m_ghosts.Clear(); DesignView.InvalidateViews(); } }
protected override void OnDragDrop(DragEventArgs drgevent) { base.OnDragDrop(drgevent); if (DesignView.Context == null) { return; } if (m_ghosts.Count > 0) { IGame dragDropTarget = TargetGame(); IGameObjectFolder rootFolder = dragDropTarget.RootGameObjectFolder; foreach (DomNode ghost in m_ghosts) { rootFolder.GameObjects.Remove(ghost.As <IGameObject>()); } ApplicationUtil.Insert( dragDropTarget, rootFolder.Cast <DomNode>(), m_ghosts, "Drag and Drop", null); m_ghosts.Clear(); DesignView.InvalidateViews(); } }
/// <summary> /// Method called on Drop events</summary> /// <param name="e">DragEventArgs containing event information</param> protected override void OnDrop(DragEventArgs e) { object target = GetDropTarget(e); if (!ApplicationUtil.CanInsert(AssociatedObject.DataContext, target, e.Data)) { return; } IDataObject dataObject = e.Data; if ((e.AllowedEffects & DragDropEffects.Copy) > 0 && (e.KeyStates & DragDropKeyStates.ControlKey) > 0) { var registry = Composer.Current.Container.GetExportedValueOrDefault <IContextRegistry>(); if (registry != null) { // Attempt to get context which was the source of this drag operation var ctx = registry.GetActiveContext <IInstancingContext>(); if (ctx != null && ctx.CanCopy()) { object rawObject = ctx.Copy(); dataObject = rawObject as IDataObject ?? new DataObject(rawObject); } } } var statusService = Composer.Current.Container.GetExportedValueOrDefault <IStatusService>(); ApplicationUtil.Insert(AssociatedObject.DataContext, target, dataObject, "Drag Drop".Localize(), statusService); e.Effects = DragDropEffects.None; e.Handled = true; }
public event_dlgConsultaLoja(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgConsultaLoja(this); }
public event_dlgCancelaVendaPayFone(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgCancelaVendaPayFone(this); }
public event_dlgRecargaGift(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgRecargaGift(this); }
/// <summary> /// Backups a file at the specified path for later retrieval /// </summary> /// <param name="game"></param> /// <param name="path"></param> /// <returns></returns> public BackupFile BackupFile(HandlerData game, string path) { string appData = ApplicationUtil.GetAppDataPath(); string gamePath = Path.Combine(appData, game.GameID); string destination = Path.Combine(gamePath, Path.GetFileName(path)); if (!File.Exists(path)) { if (File.Exists(destination)) { // we f****d up and the backup exists? maybe, so restore File.Copy(destination, path); } } else { if (File.Exists(destination)) { File.Delete(destination); } File.Copy(path, destination); } BackupFile bkp = new BackupFile(path, destination); backupFiles.Add(bkp); return(bkp); }
public event_dlgCancelaDespesa(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgCancelaDespesa(this); }
public event_dlgSelecionaEmpresa(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgSelecionaEmpresa(this); }
public event_dlgCadastroAtividade(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgCadastroAtividade(this); }
public event_dlgRecebeArqBanco(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgRecebeArqBanco(this); }
public event_dlgAdminEmpresas(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgAdminEmpresas(this); }
public event_dlgVendaOffline(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgVendaOffline(this); }
public event_dlgVendaParcelada(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgVendaParcelada(this); }
public event_dlgPesquisaChamado(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgPesquisaChamado(this); }
public event_dlgSegundaVia(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgSegundaVia(this); }
public event_dlgEduCancelarCartao(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgEduCancelarCartao(this); }
public event_dlgPassword(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgPassword(this); }
public event_dlgConfFinalRepasse(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgConfFinalRepasse(this); }
protected void btLogin_Click(object sender, EventArgs e) { string returnUrl = HttpUtility.UrlDecode(Request.QueryString["returnUrl"]); string pass = ApplicationUtil.PasswordEncrypt(txtPassword.Text); var members = new MemberRepository().SearchFor(o => o.Member_Username == txtUsername.Text || o.Member_Email == txtUsername.Text || o.Member_Phone == txtUsername.Text); if (members.Count() > 0) { tbl_Member member = members.SingleOrDefault(); if (member.Member_Password == pass) { if (member.Member_Status == false) { Value.ShowMessage(ltrLoginMessage, ErrorMessage.AccountLocked, AlertType.ERROR); txtUsername.Focus(); } else { Session["MemberID"] = member.Member_ID; Session["Member_Role"] = member.Member_Role; Session["Member_Username"] = member.Member_Username; Session["Member_Email"] = member.Member_Email; Session["Member_Avarta"] = member.Member_Avarta; Session["Member_Name"] = member.Member_Name; if (ckRemember.Checked) { Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(30); Response.Cookies["Password"].Expires = DateTime.Now.AddDays(30); Response.Cookies["UserName"].Value = txtUsername.Text.Trim(); Response.Cookies["Password"].Value = txtPassword.Text.Trim(); } else { Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1); Response.Cookies["Password"].Expires = DateTime.Now.AddDays(-1); } Value.ShowMessage(ltrLoginMessage, string.Format(ErrorMessage.Success, "Đăng nhập", ""), AlertType.ERROR); if (string.IsNullOrEmpty(returnUrl)) { Response.Redirect("/"); } else { Response.Redirect(returnUrl); } } } else { Value.ShowMessage(ltrLoginMessage, ErrorMessage.LoginFail, AlertType.ERROR); txtUsername.Focus(); } } else { Value.ShowMessage(ltrLoginMessage, ErrorMessage.LoginFail, AlertType.ERROR); txtUsername.Focus(); } }
//private void CreateInsertionAdorner() //{ // // var adornerLayer = AdornerLayer.GetAdornerLayer(this.targetItemContainer); // // this.insertionAdorner = new InsertionAdorner(this.hasVerticalOrientation, this.isInFirstHalf, this.targetItemContainer, adornerLayer); //} /// <summary> /// Method called on DragOver events</summary> /// <param name="e">DragEventArgs containing event information</param> protected override void OnDragOver(DragEventArgs e) { var source = (DependencyObject)e.OriginalSource; FrameworkElement container = null; var tv = AssociatedObject as TreeView; if (tv != null) { container = source.FindAncestor <TreeViewItem>(); } else { container = AssociatedObject.ContainerFromElement(source) as FrameworkElement; } object parentData = container != null ? container.DataContext : AssociatedObject.DataContext; if (ApplicationUtil.CanInsert(AssociatedObject.DataContext, parentData, e.Data)) { if ((e.AllowedEffects & DragDropEffects.Copy) > 0 && (e.KeyStates & DragDropKeyStates.ControlKey) > 0) { e.Effects = DragDropEffects.Copy; } else { e.Effects = DragDropEffects.Move; } e.Handled = true; } }
public event_dlgManutencaoUsuario(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgManutencaoUsuario(this); }
public event_dlgPF_CadastroLojista(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgPF_CadastroLojista(this); }
public event_dlgCompensaCheque(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgCompensaCheque(this); }
public event_dlgFatRel(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgFatRel(this); }
public event_dlgAlterarSenhaCartao(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgAlterarSenhaCartao(this); }
public event_dlgExpedicao(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgExpedicao(this); }
public event_dlgVendaEmpresarial(ApplicationUtil util, Exchange ex) { var_util = util; var_exchange = ex; i_Form = new dlgVendaEmpresarial(this); }