static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //初始化XML XMLDataManage.Init(); //OpenMemberView newview2 = new OpenMemberView(""); ////MainForm newForm2 = new MainForm ////DayInComeView newview2 = new DayInComeView(); ////CustomForm newForm2 = new CustomForm(newview2, true, false); //ToolsManage.ShowForm(newview2, true); //MainView homePage1 = new MainView(); //Application.Run(ToolsManage.ShowForm(homePage1)); //return; //this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //this.WindowState = System.Windows.Forms.FormWindowState.Maximized; //this.TopMost = true; //Application.Run(new TestForm()); //return; RootBgView root = new RootBgView(); //设置全屏 root.Size = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size; Application.Run(ToolsManage.ShowForm(root)); }
//导出营收详情 private void simpleButton2_Click(object sender, EventArgs e) { DateTime time = DateTime.ParseExact(this.start, "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.CurrentCulture); IncomeDetailView detail = new InCome.IncomeDetailView(IncomeType.MONTH_INCOME, this.earns.ToList <StructEarn>(), time.Year, time.Month); ToolsManage.ShowForm(detail, false); }
//按钮列的点击事件 public void ColumnButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; DataRow row = this.gridView1.GetDataRow(rowhandle); StructMember member = members[rowhandle]; String tag = (String)e.Button.Tag; String[] param = tag.Split('_'); //查看用户身份信息 if (param[0].Equals(TitleList.UserMsg.ToString())) { // System.Console.WriteLine("member.Memberid:"+ member.Memberid); UserIdDetailView view = new UserIdDetailView(member.Memberid); ToolsManage.ShowForm(view, false); } //消费记录 else if (param[0].Equals(TitleList.CsRecord.ToString())) { MemberConsumeRecordView view = new MemberConsumeRecordView(member.Memberid); MainViewManage.ShowSecondView(view); } //上网记录 else if (param[0].Equals(TitleList.NetRecord.ToString())) { MemberNetRecordView view = new MemberNetRecordView(member.Memberid); MainViewManage.ShowSecondView(view); } }
//点击进行修改 private void ComLabel_Click(object sender, EventArgs e) { StructRealTime com = (StructRealTime)(sender as AreaComView).Tag; ComputerDetailView view = new ComputerDetailView(com); ToolsManage.ShowForm(view, false); }
//按钮列的点击事件 public void ColumnButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; DataRow row = this.gridView1.GetDataRow(rowhandle); StructDictItem item = items[rowhandle]; MemberLevAddView view = new MemberLevAddView(item); ToolsManage.ShowForm(view, false, CloseMemberLevAddViewBlock); }
//按钮列的点击事件 public void ColumnButtonClick(object sender, ButtonPressedEventArgs e) { int row = this.gridView1.FocusedRowHandle; StructOrder order = this.orders[row]; ProductIndentDetailView view = new ProductIndentDetailView(order); ToolsManage.ShowForm(view, false); }
private void addManagerButton_Click(object sender, EventArgs e) { CloseFormHandle closeEvent = new CloseFormHandle(delegate { GetStaffList(); }); StaffAddView view = new StaffAddView(null); ToolsManage.ShowForm(view, false, closeEvent); }
//确定点击 private void simpleButton1_Click(object sender, EventArgs e) { //关闭点击 this.FindForm().Close(); //进入开卡界面 OpenMemberView open = new OpenMemberView(null); ToolsManage.ShowForm(open, false); }
private void simpleButton3_Click(object sender, EventArgs e) { ProductAddView view = new ProductAddView(null); CloseFormHandle close = new CloseFormHandle(delegate { this.mainDataTable.Clear(); GetProductList(); }); ToolsManage.ShowForm(view, false, close); }
//按钮列功能 private void ButtonPressedEventClick(object sender, ButtonPressedEventArgs e) { int row = this.gridView1.FocusedRowHandle; StructRole role = this.managers[row]; CloseFormHandle close = new CloseFormHandle(delegate { GetManagerList(); }); ManagerAddView view = new ManagerAddView(role); ToolsManage.ShowForm(view, false, close); }
// 激活上网 private void UserActive_ButtonClick(object sender, EventArgs e) { #if PRODUCT //先连接设备进行读卡 this.IsActiveCard = true; IdCardReaderManage.ReadCard(ReadCardResult, ConnectReaderResult, AuthenticateCardResult); #else UserActiveView view = new UserActiveView(); ToolsManage.ShowForm(view, false); #endif }
private void simpleButton1_Click(object sender, EventArgs e) { //关闭后再获取入口 CloseFormHandle close = new CloseFormHandle(delegate() { OpenMember(); }); int money = int.Parse(this.moneyTextEdit.Text); UserScanCodeView view = new UserScanCodeView(this.openCard, money, FLOW_STATUS.MEMBER_STATUS, PRECHARGE_TYPE.OPEN_MEMBER); ToolsManage.ShowForm(view, false, close); }
public void ButtonColumn_ButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; StructOrder order = orders[rowhandle]; CloseFormHandle close = new CloseFormHandle(delegate() { GetProductIndentList(); }); PayedProductIndentDetailView detail = new PayedProductIndentDetailView(order); ToolsManage.ShowForm(detail, false, close); }
private void simpleButton1_Click(object sender, EventArgs e) { ProductTypeAddView view = new ProductTypeAddView(); CloseFormHandle close = new CloseFormHandle(delegate() { //GetProductIndentList(); this.Invoke(new RefreshUIHandle(delegate { SystemManageNetOperation.ProductTypeInfo(ProductTypeInfoResult); })); }); ToolsManage.ShowForm(view, false, close); }
//按钮列的点击事件 public void ColumnButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; DataRow row = this.gridView1.GetDataRow(rowhandle); ProductTypeAddView view = new ProductTypeAddView(items[rowhandle]); CloseFormHandle close = new CloseFormHandle(delegate() { this.Invoke(new RefreshUIHandle(delegate { SystemManageNetOperation.ProductTypeInfo(ProductTypeInfoResult); })); }); ToolsManage.ShowForm(view, false, close); }
//读卡结果 private void ReadCardResult(StructCard readCard, bool isSuccess) { if (readCard != null && isSuccess) { //激活 RefreshUIHandle active = new RefreshUIHandle(delegate { this.IsActiveCard = false; UserActiveView view = new UserActiveView(readCard); ToolsManage.ShowForm(view, false); }); //开通会员 RefreshUIHandle open = new RefreshUIHandle(delegate { this.IsOpenMember = false; OpenMemberView view = new OpenMemberView(readCard); MainViewManage.ShowView(view); }); IdCardReaderManage.RemoveEvent(ReadCardResult, ConnectReaderResult, AuthenticateCardResult); if (this.InvokeRequired) { if (this.IsOpenMember) { this.Invoke(open); } else if (this.IsActiveCard) { this.Invoke(active); } } else { if (this.IsOpenMember) { open(); } else if (this.IsActiveCard) { active(); } } } else { this.IsOpenMember = this.IsActiveCard = false; IdCardReaderManage.OffCardReader(ReadCardResult, ConnectReaderResult, AuthenticateCardResult); MessageBox.Show("读取身份证信息失败"); } }
//保存(更新会员) private void simpleButton2_Click(object sender, EventArgs e) { //CloseFormHandle closeHandle = new CloseFormHandle(delegate //{ // this.CloseFormClick(); // //如果流程属于激活流程 // if(this.flowstatus == FLOW_STATUS.ACTIVE_STATUS) // { // ActiveFlowManage.ActiveFlow().MemberRegistSuccess(); // } //}); //显示提示 OpenMemberResultView view = new OpenMemberResultView(); ToolsManage.ShowForm(view, false); }
private void simpleButton2_Click(object sender, EventArgs e) { //if (!this.textEdit1.Text.Equals("")) //{ // StructCard.Builder newCard = new StructCard.Builder(this.activeCard); // newCard.Number = this.textEdit1.Text; // UserScanCodeView view = new UserScanCodeView(newCard.Build(), 100, PRECHARGE_TYPE.NOT_MEMBER); // ToolsManage.ShowForm(view, false); //} //else //{ //} UserScanCodeView view = new UserScanCodeView(activeCard, 100, PRECHARGE_TYPE.NOT_MEMBER); ToolsManage.ShowForm(view, false); }
//激活结果回调 private void ActiveFlowResult(ResultModel result) { if (result.pack.Cmd != Cmd.CMD_EMK_CHECKIN) { return; } System.Console.WriteLine("CardCheckInResult:" + result.pack); NetMessageManage.RemoveResultBlock(ActiveFlowResult); if (result.pack.Content.MessageType != 1) { FLOW_ERROR error = FLOW_ERROR.OTHER; Enum.TryParse <FLOW_ERROR>(result.pack.Content.ErrorTip.Key, out error); switch (error) { //需要充值 case FLOW_ERROR.NEED_RECHARGE: UserScanCodeView codeView = new UserScanCodeView(this.activeCard, 100, FLOW_STATUS.ACTIVE_STATUS, (int)PRECHARGE_TYPE.NOT_MEMBER); ToolsManage.ShowForm(codeView, false); break; //提醒是否开通会员 case FLOW_ERROR.NEED_ADD_CARD: { AddCardInfo(); } break; //用户锁定 case FLOW_ERROR.USER_LOCK: { MessageBox.Show("该用户已经被锁"); } break; } return; } //激活成功后提示激活成功,将值设置成不激活状态 else { _manage = null; activeCard = null; UserActivResultView view = new UserActivResultView(); ToolsManage.ShowForm(view, false); } }
private void CardCheckOutResult(ResultModel result) { if (result.pack.Cmd != Cmd.CMD_EMK_CHECKOUT) { return; } NetMessageManage.RemoveResultBlock(CardCheckOutResult); #if DEBUG System.Console.WriteLine("CardCheckOutResult:" + result.pack); #endif if (result.pack.Content.MessageType == 1) { this.Invoke(new RefreshUIHandle(delegate { this.CloseFormClick(); UserCloseCpView view = new UserCloseCpView(); ToolsManage.ShowForm(view, false); })); } }
public void ColumnButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; StructGoods product = this.products[rowhandle]; DataRow row = this.gridView1.GetDataRow(rowhandle); String tag = (String)e.Button.Tag; String[] param = tag.Split('_'); //查看销售记录 if (param[0].Equals(TitleList.SellRecord.ToString())) { ProductSellRecordView view = new ProductSellRecordView(product.GoodsId); MainViewManage.ShowSecondView(view); } else if (param[0].Equals(TitleList.Operation.ToString())) { //修改信息 if (param[1].Equals("0")) { ProductAddView view = new ProductAddView(product); CloseFormHandle close = new CloseFormHandle(delegate { this.mainDataTable.Clear(); GetProductList(); }); ToolsManage.ShowForm(view, false, close); } //删除 else { List <int> ids = new List <int>() { product.GoodsId, }; ProductNetOperation.DeleteProduct(DeleteProductResult, ids); } } }
//按钮列功能 private void ButtonPressedEventClick(object sender, ButtonPressedEventArgs e) { int row = this.gridView1.FocusedRowHandle; StructAccount staff = this.staffs[row]; char[] splits = { '_' }; string[] res = ((string)e.Button.Tag).Split(splits); //修改 if (res[1].Equals("0")) { CloseFormHandle closeEvent = new CloseFormHandle(delegate { GetStaffList(); }); StaffAddView view = new StaffAddView(staff); ToolsManage.ShowForm(view, false, closeEvent); } //删除 else if (res[1].Equals("1")) { StaffNetOperation.DeleteStaffs(DeleteStaffsResult, staff.Guid); } }
private void ButtonEdit_ButtonClick(object sender, ButtonPressedEventArgs e) { int rowhandle = this.gridView1.FocusedRowHandle; StructRealTime computer = coms[rowhandle]; if (computer.Cardnumber.Equals("")) { return; } DataRow row = this.gridView1.GetDataRow(rowhandle); char[] splites = { '_' }; string [] btnparams = ((string)e.Button.Tag).Split(splites); //锁定 if (btnparams[1].Equals("1")) { UserLockView view = new UserLockView(computer.Cardnumber); ToolsManage.ShowForm(view, false); } //强制下机 else if (btnparams[1].Equals("0")) { List <string> cards = new List <string>() { computer.Cardnumber }; HomePageNetOperation.ManagerCommandOperation(ManagerCommandOperationResult, COMMAND_TYPE.TICKOFF, cards); } //验证 else if (btnparams[1].Equals("2")) { List <string> cards = new List <string>() { computer.Cardnumber }; HomePageNetOperation.ManagerCommandOperation(ManagerCommandOperationResult, COMMAND_TYPE.VERIFY, cards); } }
//导出营收详情 private void simpleButton2_Click(object sender, EventArgs e) { IncomeDetailView detail = new InCome.IncomeDetailView(IncomeType.DAY_INCOME, this.earns.ToList <StructEarn>(), 0, 0); ToolsManage.ShowForm(detail, false); }
//添加会员等级 private void button1_Click(object sender, EventArgs e) { MemberLevAddView view = new MemberLevAddView(); ToolsManage.ShowForm(view, false, CloseMemberLevAddViewBlock); }
//全部结帐 private void CheckOut_ButtonClick(object sender, EventArgs e) { CheckOutView view = new CheckOutView(); ToolsManage.ShowForm(view, false); }
//呼叫服务 private void CallService_ButtonClick(object sender, EventArgs e) { CallServiceView view = new CallServiceView(); ToolsManage.ShowForm(view, false); }
private void simpleButton3_Click(object sender, EventArgs e) { ProductStockListView view = new ProductStockListView(); ToolsManage.ShowForm(view, false); }
//封禁账户 private void simpleButton2_Click(object sender, EventArgs e) { UserLockView view = new UserLockView(currentCom.Cardnumber); ToolsManage.ShowForm(view, false); }
//关闭闲机 private void CloseMache_ButtonClick(object sender, EventArgs e) { CloseMacheView view = new CloseMacheView(); ToolsManage.ShowForm(view, false); }