private void btnLoad_Click(object sender, EventArgs e) { if (ValidateInput()) { clsSubDAccount subd = clsSubDAccount.GetSubDAccount(txtMobileNum.Text); clsLoadWalletTransaction wallet = new clsLoadWalletTransaction(); wallet.Load_Id = m_LoadAccount.LoadId; wallet.UserId = myPosWide.m_user.UserId; wallet.SubDId = subd != null ? subd.Id_subdAccounts : 0; wallet.Timestamp = DateTime.Now; wallet.LoadAmount = double.Parse(txtLoadAmount.Text); wallet.MobileNum = txtMobileNum.Text; wallet.DiscountPercentage = double.Parse(txtDisCount.Text); wallet.AmtDue = double.Parse(txtAmtDue.Text); frmInput input = new frmInput(); double amountdue = wallet.AmtDue; input.Title = "Payment"; input.Value = amountdue.ToString("0.00"); input.Caption = "Enter Tendered Amount"; if (input.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (Convert.ToDouble(input.Value) >= amountdue) { wallet.TenderedAmount = Convert.ToDouble(input.Value); if (wallet.Save()) { Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); wallet.PrintReceipt(); RefreshAccount(); } else { MessageBox.Show("Transaction not saved.", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (MessageBox.Show("Amount entered is less than the Amount Due. Charge to Sub-D Account?", "Payment", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == System.Windows.Forms.DialogResult.Yes) { wallet.TenderedAmount = Convert.ToDouble(input.Value); if (wallet.Save()) { Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); wallet.PrintReceipt(); RefreshAccount(); } else { MessageBox.Show("Transaction not saved.", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } } }
private void btnInputForm_Click(object sender, EventArgs e) { frmInput oInputForm = new frmInput(); this.Hide(); oInputForm.ShowDialog(); this.Close(); }
public static string show_out(string defText) { frmInput fi = new frmInput(); fi.input = defText; fi.textBoxX1.Text = defText; fi.ShowDialog(); return (fi.input); }
private void cmsChangeNumber_Click(object sender, EventArgs e) { int index = dgvData.SelectedRows[0].Index; DataRow drow = dtDgv.Rows[index]; fInput.MyStr = drow["num"].ToString(); fInput.Price = drow["outPrice"].ToString(); if (fInput.ShowDialog() == DialogResult.OK) { displayMoney(fInput.MyStr, fInput.Price + "", true); } }
public static string ShowInput(string instructions) { string retVal = null; using (var form = new frmInput()) { form.lbInstructions.Text = instructions; if (form.ShowDialog() == DialogResult.OK) retVal = form.txInput.Text; } return retVal; }
private void txtInput_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { e.SuppressKeyPress = true; ValidateInput(); } else { switch (e.KeyCode) { case Keys.F1: RetrieveOrder(); frmInput input = new frmInput(); if (mReceipt != null) { input.Caption = "Customer:"; input.InputValue = mReceipt.CustomerName; input.ShowDialog(); mReceipt.CustomerName = input.InputValue; cboName.SelectedItem = input.InputValue; mReceipt.Save(); } break; case Keys.F2: NewCustomer(); break; case Keys.F3: AcceptOrder(); break; case Keys.F4: ValidateOrder(true); break; case Keys.F5: RetrieveOrder(); break; case Keys.F6: mAddItem = true; AddRemoveItem(); break; case Keys.F7: mAddItem = false; AddRemoveItem(); break; case Keys.F8: Setup(); break; case Keys.F9: Summary(); break; case Keys.F10: Print(); break; case Keys.F11: Settings(); break; } } }
private void btnFundTransfer_Click(object sender, EventArgs e) { if (!clsUtil.GetApproval(m_user, UserAccess.Supervisor)) { return; } clsLoadAccount acc = GetSelAccount(); if (acc != null) { frmInput input = new frmInput(); input.withDecimal = true; input.IsNumericOnly = true; input.Value = ""; input.Title = "Fund Transfer"; input.Caption = "Enter amount to transfer"; if (input.ShowDialog() == System.Windows.Forms.DialogResult.OK) { clsReloadHistory reload = new clsReloadHistory(); reload.Amount = Convert.ToDouble(input.Value); reload.Load_Id = acc.LoadId; reload.RefNum = string.Format("FUNDTRANS{0:yyyyMMddHHssmm}", DateTime.Now); reload.Timestamp = DateTime.Now; reload.UserId = m_user.UserId; reload.Remarks = "Fund Transfer"; reload.TransactionAmount = 0; reload.RemainingBalance = acc.CurrentBalance - Convert.ToDouble(input.Value); if (reload.Save()) { acc.CurrentBalance = reload.RemainingBalance; acc.AvailableBalance = reload.RemainingBalance; if (acc.Save()) { reload.PrintReceipt(acc); ReloadAccounts(); } else { MessageBox.Show("Fund Transfer Failed!", "Fund Transfer", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } }
private void lblThu2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { string lbl = ((LinkLabel)sender).Name; if (lbl == "lbl0") { thu = Thu.Thu2; } else if (lbl == "lbl1") { thu = Thu.Thu3; } else if (lbl == "lbl2") { thu = Thu.Thu4; } else if (lbl == "lbl3") { thu = Thu.Thu5; } else if (lbl == "lbl4") { thu = Thu.Thu6; } else if (lbl == "lbl5") { thu = Thu.Thu7; } else { thu = Thu.ChuNhat; } frmInput frm = new frmInput(); frm.Text = thu.ToString(); frm.truyen += new frmInput.TruyenMatKhau(NhanDuLieu); frm.ShowDialog(); } catch (Exception ex) { throw ex; } }
private void btnLoad_Click(object sender, EventArgs e) { if (ValidateInput()) { clsEloadTransaction eload = new clsEloadTransaction(); eload.Load_Id = m_LoadAccount.LoadId; eload.Timestamp = DateTime.Now; eload.AmountDue = double.Parse(txtAmtDue.Text.Trim()); eload.Rebate = double.Parse(txtRebate.Text.Trim()); eload.Transaction_Amount = double.Parse(txtTransAmount.Text); eload.MobileNum = txtMobile.Text; eload.ELoadName = cmbLoadAmt.Text; eload.UserId = myPosWide.m_user.UserId; eload.Remarks = cmbLoadAmt.Text; frmInput input = new frmInput(); double amountdue = eload.AmountDue; input.Title = "Payment"; input.Value = amountdue.ToString("0.00"); input.Caption = "Enter Tendered Amount"; if (input.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (Convert.ToDouble(input.Value) >= amountdue) { eload.TenderedAmount = Convert.ToDouble(input.Value); if (eload.Save()) { Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); eload.PrintReceipt(); RefreshAccount(); } else { MessageBox.Show("Transaction not saved.", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("Amount entered is less than the Amount Due", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }
private void btnRecompute_Click(object sender, EventArgs e) { frmInput frm = new frmInput(); frm.Title = "Recompute Service Fee"; frm.Caption = "Enter Service Fee %:"; frm.Value = "2"; frm.IsNumericOnly = true; frm.withDecimal = true; if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (Convert.ToDouble(frm.Value) > 5) { MessageBox.Show("Invalid Service Fee Percentage. Must be less than 5"); } else { txtCSSvcFee.Text = (Convert.ToDouble(txtCSAmount.Text) * (Convert.ToDouble(frm.Value) / 100)).ToString("0.00"); } } }
void miRenameReplayClick(object sender, System.EventArgs e) { Replay replay = null; if (lvReplays.SelectedItems.Count == 1) { ReplayStore.ReplayRow row = storeReader.GetReplayByID((int)lvReplays.SelectedItems[0].Tag); frmInput input = new frmInput(); string question = StoreReader.STORE_REPLAYNAMERENAME_INPUT.Replace("{0}", row.Name);; input.Question = question; input.Caption = "Replay Rename..."; input.Input = row.Name; input.MaxLength = 255; DialogResult result = input.ShowDialog(this); if (result == DialogResult.OK) { ReplayReader reader = new ReplayReader(replayManager.ReplayManagerFilePath + @"\" + row.Filename); replay = reader.Read(); if (replay != null && replayManager.RenameReplay(replay, input.Input)) { Methods.RenameReplay(storeReader, row.ID, input.Input); dvReplays = Methods.CreateReplayDataView(storeReader, storeReader.Replays); Methods.PopulateReplaysView(lvReplays, dvReplays, dvReplays.RowFilter, dvReplays.Sort); } else { string error = ReplayManager.MANAGER_REPLAYFILERENAME_FAIL.Replace("{0}", row.Filename); error = error.Replace("{1}", input.Input); MessageBox.Show(this, error, "Rename failed!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } else MessageBox.Show(this, StoreReader.STORE_REPLAYFILERENAME_SELECT, "Rename failed!", MessageBoxButtons.OK, MessageBoxIcon.Error); }
private void button1_Click(object sender, EventArgs e) { frmInput f = new frmInput(); f.ShowDialog(this); }
private void tsbPointcutNew_Click(object sender, EventArgs e) { if (existAdvice()) { frmInput inp = new frmInput(frmInput.FormType.mdPointcut, frmInput.FormMode.mdInsert); inp.ShowDialog(); if (inp.DialogResult == System.Windows.Forms.DialogResult.OK) { aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].addPointcut( new Pointcut(frmInput.text1, frmInput.text2, frmInput.text3) ); updateGridViewPointcut(); } } }
void miNewCategoryClick(object sender, System.EventArgs e) { frmInput input = new frmInput(); input.Question = StoreReader.STORE_CATEGORYNEW_INPUT; input.Caption = "Create New Category..."; DialogResult result = input.ShowDialog(this); if (result == DialogResult.OK) { Methods.CreateNewCategory(storeReader, input.Input, (int)tvCategories.SelectedNode.Tag); Methods.PopulateCategoriesView(tvCategories, storeReader); } }
private void saveListToolStripMenuItem_Click(object sender, EventArgs e) { if (Settings.CurrentFileName == "") { if (lstList.Items.Count > 0) { frmInput fi = new frmInput(); fi.Caption = Settings.ApplicationName; fi.Label = "Please enter list name"; if (fi.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Settings.CurrentFileName = fi.Value; if (Settings.Names.IndexOf(Settings.CurrentFileName) < 0) { Settings.Names.Add(Settings.CurrentFileName); } SaveConfig(); SaveWordsToFile(); isFileSaved = true; } } else { MessageBox.Show("Nothing to Save"); } } else { SaveWordsToFile(); isFileSaved = true; } }
private void nhậpKhoToolStripMenuItem_Click(object sender, EventArgs e) { frmInput frm = new frmInput(); frm.ShowDialog(); }
private void tsbAspectNew_Click(object sender, EventArgs e) { frmInput inp = new frmInput(frmInput.FormType.mdAspect, frmInput.FormMode.mdInsert); inp.ShowDialog(); if (inp.DialogResult == System.Windows.Forms.DialogResult.OK) { aspects.Add(new Aspect(frmInput.text1)); updateGridViewAspect(); } }
private void btnProcessGCash_Click(object sender, EventArgs e) { if (ValidateInput()) { double amountdue = 0; clsGCashTransaction gc = new clsGCashTransaction(); gc.SenderName = txtSenderName.Text; gc.SenderContact = txtSenderNum.Text; gc.RecipientName = txtRecipientName.Text; gc.RecipientContact = txtRecipientNum.Text; gc.GCashNumber = txtGCashMobNum.Text; gc.TransDate = DateTime.Now; gc.Country = ""; if (tabCtrl.SelectedIndex == 0) { if (optCashIn.Checked) { gc.TransactionType = GCashTransType.CashIn; } else if (optCashOut.Checked) { gc.TransactionType = GCashTransType.CashOut; } else if (optSendOthers.Checked) { gc.TransactionType = GCashTransType.SendToOthers; } gc.RefNum = txtRefNum1.Text; gc.TransAmount = Convert.ToDouble(txtAmount1.Text); gc.SvcFeeAmount = Convert.ToDouble(txtSvcFee1.Text); gc.Rebate = Convert.ToDouble(txtRebate1.Text); } else if (tabCtrl.SelectedIndex == 1) { if (optRecInt.Checked) { gc.TransactionType = GCashTransType.IntCashPickUp; gc.Country = txtCountry.Text; } else if (optRecDom.Checked) { gc.TransactionType = GCashTransType.DomCashPickup; } gc.RefNum = txtRefNum2.Text; gc.TransAmount = Convert.ToDouble(txtAmount2.Text); gc.SvcFeeAmount = Convert.ToDouble(txtSvcFee2.Text); gc.Rebate = Convert.ToDouble(txtRebate2.Text); } else if (tabCtrl.SelectedIndex == 2) { if (optSendP2P.Checked) { gc.TransactionType = GCashTransType.RemitSend; gc.TransAmount = Convert.ToDouble(txtAmount3.Text); gc.SvcFeeAmount = Convert.ToDouble(txtSvcFee3.Text); gc.Rebate = Convert.ToDouble(txtRebate3.Text); } else if (optCancelP2P.Checked) { gc.TransactionType = GCashTransType.RemitCancel; gc.TransAmount = Convert.ToDouble(txtAmount3.Text); gc.SvcFeeAmount = Convert.ToDouble(txtSvcFee3.Text); gc.Rebate = Convert.ToDouble(txtRebate3.Text); } gc.RefNum = ""; } amountdue = gc.TransAmount + gc.SvcFeeAmount; gc.UserId = myPosWide.m_user.UserId; gc.UserName = myPosWide.m_user.UserName; gc.Remarks = clsGCashTransaction.GetTransType(gc.TransactionType); gc.Load_Id = m_LoadAccount.LoadId; if (tabCtrl.SelectedIndex == 2 && optCancelP2P.Checked) { amountdue = gc.SvcFeeAmount; if (MessageBox.Show(string.Format("Amount: {0:0.00}\nService Fee: {1:0.00}\nPayout Amount: {2:0.00}\n\nAre you sure this is correct?", gc.TransAmount, gc.SvcFeeAmount, gc.TransAmount - gc.SvcFeeAmount), "Cancel Remittance", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { if (gc.Save()) { MessageBox.Show("Transaction completed", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); Clear(); string ret = ""; Receipt or = new Receipt(); or.InitializePrinter(); List <string> strmsg = new List <string>(); ret += or.PrintCompanyHeader(); strmsg.Add("G-CASH"); strmsg.Add(gc.Remarks); ret += or.PrintAppend(strmsg, PrintFontAlignment.Center, PrintFontSize.UnderlineBold); strmsg.Clear(); strmsg.Add(string.Format("Cashier: {0}", myPosWide.m_user.UserName.ToUpper())); strmsg.Add(string.Format("Date: {0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); strmsg.Add(string.Format("TransId: {0}", gc.GCashtTransId)); strmsg.Add(""); strmsg.Add(string.Format("{0}", gc.Remarks)); strmsg.Add(string.Format("Sender: {0:0.00}", gc.SenderName)); strmsg.Add(string.Format("Recipient: {0:0.00}", gc.RecipientName)); strmsg.Add(string.Format("RefNum: {0:0.00}", gc.RefNum)); strmsg.Add(string.Format("Trans Amount: P {0:0.00}", gc.TransAmount)); strmsg.Add(string.Format("Service Fee: P {0:0.00}", gc.SvcFeeAmount)); strmsg.Add(string.Format("Payout Amount: P {0:0.00}", gc.TransAmount - gc.SvcFeeAmount)); strmsg.Add(""); strmsg.Add(""); ret += or.PrintAppend(strmsg, PrintFontAlignment.Left, PrintFontSize.Regular); or.FormFeed(); or.OpenDrawer(); or.ExecPrint(ret); strmsg.Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); RefreshAccount(); } } } else if (tabCtrl.SelectedIndex == 0 && optCashOut.Checked) { amountdue = gc.SvcFeeAmount; if (MessageBox.Show(string.Format("Amount: {0:0.00}\nService Fee: {1:0.00}\nPayout Amount: {2:0.00}\n\nAre you sure this is correct?", gc.TransAmount, gc.SvcFeeAmount, gc.TransAmount - gc.SvcFeeAmount), "Cash Out", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { if (gc.Save()) { Clear(); string ret = ""; Receipt or = new Receipt(); or.InitializePrinter(); List <string> strmsg = new List <string>(); ret += or.PrintCompanyHeader(); strmsg.Add("G-CASH"); strmsg.Add(gc.Remarks); ret += or.PrintAppend(strmsg, PrintFontAlignment.Center, PrintFontSize.UnderlineBold); strmsg.Clear(); strmsg.Add(string.Format("Cashier: {0}", myPosWide.m_user.UserName.ToUpper())); strmsg.Add(string.Format("Date: {0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); strmsg.Add(string.Format("TransId: {0}", gc.GCashtTransId)); strmsg.Add(""); strmsg.Add(string.Format("{0}", gc.Remarks)); strmsg.Add(string.Format("Sender: {0:0.00}", gc.SenderName)); strmsg.Add(string.Format("Recipient: {0:0.00}", gc.RecipientName)); strmsg.Add(string.Format("RefNum: {0:0.00}", gc.RefNum)); strmsg.Add(string.Format("Trans Amount: P {0:0.00}", gc.TransAmount)); strmsg.Add(string.Format("Service Fee: P {0:0.00}", gc.SvcFeeAmount)); strmsg.Add(string.Format("Payout Amount: P {0:0.00}", gc.TransAmount - gc.SvcFeeAmount)); strmsg.Add(""); strmsg.Add(""); ret += or.PrintAppend(strmsg, PrintFontAlignment.Left, PrintFontSize.Regular); or.FormFeed(); or.OpenDrawer(); or.ExecPrint(ret); strmsg.Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); RefreshAccount(); } } } else if (tabCtrl.SelectedIndex == 1) { if (MessageBox.Show(string.Format("You are about to deduct {0:0.00} from your actual cash on hand. \n\nAre you sure this is correct?", gc.TransAmount), "Receive Remittance", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { if (gc.Save()) { Clear(); string ret = ""; Receipt or = new Receipt(); or.InitializePrinter(); List <string> strmsg = new List <string>(); ret += or.PrintCompanyHeader(); strmsg.Add("G-CASH"); strmsg.Add(gc.Remarks); ret += or.PrintAppend(strmsg, PrintFontAlignment.Center, PrintFontSize.UnderlineBold); strmsg.Clear(); strmsg.Add(string.Format("Cashier: {0}", myPosWide.m_user.UserName.ToUpper())); strmsg.Add(string.Format("Date: {0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); strmsg.Add(string.Format("TransId: {0}", gc.GCashtTransId)); strmsg.Add(""); strmsg.Add(string.Format("Sender: {0:0.00}", gc.SenderName)); strmsg.Add(string.Format("Recipient: {0:0.00}", gc.RecipientName)); strmsg.Add(string.Format("RefNum: {0:0.00}", gc.RefNum)); strmsg.Add(string.Format("Trans Amount: P {0:0.00}", gc.TransAmount)); strmsg.Add(string.Format("Service Fee: P {0:0.00}", gc.SvcFeeAmount)); strmsg.Add(string.Format("Payout Amount: P {0:0.00}", gc.TransAmount - gc.SvcFeeAmount)); ret += or.PrintAppend(strmsg, PrintFontAlignment.Left, PrintFontSize.Regular); or.FormFeed(); or.OpenDrawer(); or.ExecPrint(ret); strmsg.Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); RefreshAccount(); } } } else { frmInput input = new frmInput(); input.Title = "Payment"; input.Value = amountdue.ToString("0.00"); input.Caption = "Enter Tendered Amount"; if (input.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (Convert.ToDouble(input.Value) >= amountdue) { gc.TenderedAmount = Convert.ToDouble(input.Value); gc.Save(); MessageBox.Show("Transaction completed", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); Clear(); string ret = ""; Receipt or = new Receipt(); or.InitializePrinter(); List <string> strmsg = new List <string>(); ret += or.PrintCompanyHeader(); strmsg.Add(""); strmsg.Add("G-CASH"); strmsg.Add(gc.Remarks); ret += or.PrintAppend(strmsg, PrintFontAlignment.Center, PrintFontSize.UnderlineBold); strmsg.Clear(); strmsg.Clear(); strmsg.Add(string.Format("Cashier: {0}", myPosWide.m_user.UserName.ToUpper())); strmsg.Add(string.Format("Date: {0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); strmsg.Add(string.Format("TransId: {0}", gc.GCashtTransId)); strmsg.Add(""); strmsg.Add(string.Format("Sender: {0:0.00}", gc.SenderName)); strmsg.Add(string.Format("Recepient: {0:0.00}", gc.RecipientName)); strmsg.Add(string.Format("Recepient Number: {0:0.00}", gc.RecipientContact)); strmsg.Add(string.Format("Trans Amount: P {0:0.00}", gc.TransAmount)); strmsg.Add(string.Format("Service Fee: P {0:0.00}", gc.SvcFeeAmount)); strmsg.Add(string.Format("Tendered Amount: P {0:0.00}", gc.TenderedAmount)); strmsg.Add(string.Format("Change: P {0:0.00}", gc.TenderedAmount - (gc.TransAmount + gc.SvcFeeAmount))); strmsg.Add(""); strmsg.Add(""); ret += or.PrintAppend(strmsg, PrintFontAlignment.Left, PrintFontSize.Regular); or.FormFeed(); or.OpenDrawer(); or.ExecPrint(ret); strmsg.Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); RefreshAccount(); } else { MessageBox.Show("Amount entered is less than the Amount Due", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } else { MessageBox.Show("Kindly fill-out required fields", "Process", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void bbtaddfa_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmInput dlg = new frmInput(); dlg.Text = "������Ϣ"; dlg.InputType = progtype; if (dlg.ShowDialog(this) == DialogResult.OK) { if (Layer.CkLayerExist(dlg.InputString, this.SymbolDoc)) { MessageBox.Show("�ĵ����Ѿ�����ͬ��������", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //Layer lar = Layer.CreateNew(dlg.InputString, this.SymbolDoc); //lar.SetAttribute("layerType", dlg.InputType); //if (ilist.Count > 0) //{ // lar.SetAttribute("ParentID", ilist[0].ToString()); //} addflag = true; //this.checkedListBox1.Items.Add(lar, true); //checkedListBox1.SelectedIndex = checkedListBox1.Items.Count - 1; DataTable dt = treeList1.DataSource as DataTable; SVG_LAYER _svg = new SVG_LAYER() { SUID = Guid.NewGuid().ToString().Substring(0, 10) }; //if (treeList1.FocusedNode != null) { _svg.NAME = dlg.InputString; _svg.SUID = "FA" + _svg.SUID; //_svg.ParentID = treeList1.FocusedNode["ParentID"].ToString(); _svg.YearID = ilist[0].ToString(); _svg.svgID = symbolDoc.SvgdataUid; //_svg.OrderID = int.Parse(treeList1.FocusedNode["OrderID"].ToString()) + 1; _svg.MDATE = DateTime.Now; Services.BaseService.Create<SVG_LAYER>(_svg); //�������㷽�� PSP_ELCPROJECT pd = new PSP_ELCPROJECT(); pd.ID = _svg.SUID; pd.Name = dlg.InputString; pd.FileType = "����"; pd.Class = System.DateTime.Now.ToString(); if (!string.IsNullOrEmpty(StrYear) && StrYear.Length == 4) { pd.BelongYear = StrYear; } pd.ProjectID = Itop.Client.MIS.ProgUID; Services.BaseService.Create<PSP_ELCPROJECT>(pd); } DataRow row = dt.NewRow(); dt.Rows.Add(DataConverter.ObjectToRow(_svg, row)); } }
private void bbtaddlayer_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmInput dlg = new frmInput(); dlg.InputType = progtype; if (dlg.ShowDialog(this) == DialogResult.OK) { if (Layer.CkLayerExist(dlg.InputString, this.SymbolDoc)) { MessageBox.Show("�ĵ����Ѿ�����ͬ��ͼ�㡣", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Layer lar = Layer.CreateNew(dlg.InputString, this.SymbolDoc); lar.SetAttribute("layerType", dlg.InputType); if (ilist.Count > 0) { lar.SetAttribute("ParentID", ilist[0].ToString()); } addflag = true; DataTable dt = treeList1.DataSource as DataTable; SVG_LAYER _svg = new SVG_LAYER() { SUID = lar.ID, NAME = lar.Label }; if (treeList1.FocusedNode != null) { _svg.ParentID = treeList1.FocusedNode["ParentID"].ToString(); if (ilist.Count!=0) { _svg.YearID = ilist[0].ToString(); } _svg.svgID = symbolDoc.SvgdataUid; _svg.OrderID = int.Parse(treeList1.FocusedNode["OrderID"].ToString()) + 1; _svg.MDATE = DateTime.Now; _svg.layerType = progtype; Services.BaseService.Create<SVG_LAYER>(_svg); } DataRow row = dt.NewRow(); dt.Rows.Add(DataConverter.ObjectToRow(_svg, row)); } }
public static string show_out() { frmInput fi = new frmInput(); fi.ShowDialog(); return (fi.input); }
private void tsbAspectEdit_Click(object sender, EventArgs e) { if (existAspect()) { frmInput.text1 = aspects[gvAspect.CurrentRow.Index].Name; frmInput inp = new frmInput(frmInput.FormType.mdAspect, frmInput.FormMode.mdEdit); inp.ShowDialog(); if (inp.DialogResult == System.Windows.Forms.DialogResult.OK) { aspects[gvAspect.CurrentRow.Index].Name = frmInput.text1; updateGridViewAspect(); } } }
private void tsbPointcutEdit_Click(object sender, EventArgs e) { if (existPointcut()) { frmInput.text1 = aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Pointcuts[gvPointcut.CurrentRow.Index].Process; frmInput.text2 = aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Pointcuts[gvPointcut.CurrentRow.Index].Task; frmInput.text3 = aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Pointcuts[gvPointcut.CurrentRow.Index].Condition; frmInput inp = new frmInput(frmInput.FormType.mdPointcut, frmInput.FormMode.mdEdit); inp.ShowDialog(); if (inp.DialogResult == System.Windows.Forms.DialogResult.OK) { aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Pointcuts[gvPointcut.CurrentRow.Index].Process = frmInput.text1; aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Pointcuts[gvPointcut.CurrentRow.Index].Task = frmInput.text2; aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Pointcuts[gvPointcut.CurrentRow.Index].Condition = frmInput.text3; updateGridViewPointcut(); } } }
private void configRename() { frmInput df = new frmInput(); df.DialogText = "Gib den neuen Konfigurationsname ein:"; df.DialogTitel = "Konfiguration umbenennen"; df.DialogDefaultValue = ds.DataTable1.Rows[cmbKonfiguration.SelectedIndex][ds.DataTable1.ConfigNameColumn.ColumnName].ToString(); df.ShowDialog(); if (df.Konfigurationsname == "") return; try { ds.DataTable1.Rows[cmbKonfiguration.SelectedIndex][ds.DataTable1.ConfigNameColumn] = df.Konfigurationsname; ds.WriteXml("./config.xml"); } catch (Exception ex) { webbrowser(ex.Message); } }
// private void btEdit_Click(object sender, EventArgs e) { if (this.checkedListBox1.SelectedIndex >= 0 && this.checkedListBox1.SelectedIndex < this.checkedListBox1.Items.Count) { Layer layer = this.checkedListBox1.Items[this.checkedListBox1.SelectedIndex] as Layer; if (!CkRight(layer)) { MessageBox.Show("����ͼ�㲻�ܸ�����ɾ����", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } frmInput dlg = new frmInput(); dlg.id = symbolDoc.SvgdataUid; dlg.symbolDoc = symbolDoc; dlg.InputString = layer.Label; dlg.InputType = layer.GetAttribute("layerType"); DialogResult d = dlg.ShowDialog(this); if (d == DialogResult.OK) { layer.Label = dlg.InputString; layer.SetAttribute("layerType", dlg.InputType); InitData(); } if (d == DialogResult.Retry) { if (dlg.list.Count > 1) { layer.SetAttribute("ParentID", dlg.list[1].ToString()); SVG_LAYER temp = new SVG_LAYER(); temp.SUID = layer.ID; temp.svgID = symbolDoc.SvgdataUid; SVG_LAYER lar = (SVG_LAYER)Services.BaseService.GetObject("SelectSVG_LAYERByKey", temp); lar.YearID = dlg.list[1].ToString(); Services.BaseService.Update<SVG_LAYER>(lar); } } } }
private void configAdd() { try { frmInput s = new frmInput(); s.DialogText = "Vergib Deiner Schlachtkonfiguration einen Namen:"; s.DialogTitel = "speichern"; s.ShowDialog(); if (s.Konfigurationsname == "") return; DataSet1.DataTable1Row row; row = ds.DataTable1.NewDataTable1Row(); row.ConfigName = s.Konfigurationsname; row.Bandit = rbBandit.Checked; row.Player = rbPlayer.Checked; row.Attacker = txtAngreiferName.Text; row.DefenderName = txtDefenderName.Text; //Angreifer 1 row.AR1 = Convert.ToInt16(txtAR1.Text); row.AB1 = Convert.ToInt16(txtAB1.Text); row.AM1 = Convert.ToInt16(txtAM1.Text); row.AC1 = Convert.ToInt16(txtAC1.Text); row.AL1 = Convert.ToInt16(txtAL1.Text); row.AS1 = Convert.ToInt16(txtAS1.Text); row.AE1 = Convert.ToInt16(txtAE1.Text); row.AA1 = Convert.ToInt16(txtAA1.Text); row.AK1 = Convert.ToInt16(txtAK1.Text); //Angreifer 2 row.AR2 = Convert.ToInt16(txtAR2.Text); row.AB2 = Convert.ToInt16(txtAB2.Text); row.AM2 = Convert.ToInt16(txtAM2.Text); row.AC2 = Convert.ToInt16(txtAC2.Text); row.AL2 = Convert.ToInt16(txtAL2.Text); row.AS2 = Convert.ToInt16(txtAS2.Text); row.AE2 = Convert.ToInt16(txtAE2.Text); row.AA2 = Convert.ToInt16(txtAA2.Text); row.AK2 = Convert.ToInt16(txtAK2.Text); row.AG2 = chkG1.Checked; //Angreifer 3 row.AR3 = Convert.ToInt16(txtAR3.Text); row.AB3 = Convert.ToInt16(txtAB3.Text); row.AM3 = Convert.ToInt16(txtAM3.Text); row.AC3 = Convert.ToInt16(txtAC3.Text); row.AL3 = Convert.ToInt16(txtAL3.Text); row.AS3 = Convert.ToInt16(txtAS3.Text); row.AE3 = Convert.ToInt16(txtAE3.Text); row.AA3 = Convert.ToInt16(txtAA3.Text); row.AK3 = Convert.ToInt16(txtAK3.Text); row.AG3 = chkG3.Checked; //Player row.DR = Convert.ToInt16(txtDR.Text); row.DB = Convert.ToInt16(txtDB.Text); row.DM = Convert.ToInt16(txtDM.Text); row.DC = Convert.ToInt16(txtDC.Text); row.DL = Convert.ToInt16(txtDL.Text); row.DS = Convert.ToInt16(txtDS.Text); row.DE = Convert.ToInt16(txtDE.Text); row.DA = Convert.ToInt16(txtDA.Text); row.DK = Convert.ToInt16(txtDK.Text); row.DG = chkDG.Checked; row.DT = chkDT.Checked; //Banditen row.BanditName = txtBanditName.Text; row.PL = Convert.ToInt16(txtPL.Text); row.SL = Convert.ToInt16(txtSL.Text); row.WH = Convert.ToInt16(txtWH.Text); row.RB = Convert.ToInt16(txtRB.Text); row.SW = Convert.ToInt16(txtSW.Text); row.WL = Convert.ToInt16(txtWL.Text); row.BT = chkBT.Checked; //Boss row.noBoss = rbKeinBoss.Checked; row.ST = rbST.Checked; row.EB = rbEB.Checked; row.CK = rbCK.Checked; row.MG = rbMG.Checked; row.DWW = rbDWW.Checked; ds.DataTable1.AddDataTable1Row(row); cmbKonfiguration.SelectedIndex = cmbKonfiguration.Items.Count - 1; } catch (Exception ex) { webbrowser(ex.Message); } }
private void btAdd_Click(object sender, EventArgs e) { frmInput dlg = new frmInput(); dlg.InputType = progtype; if (dlg.ShowDialog(this) == DialogResult.OK) { if (Layer.CkLayerExist(dlg.InputString, this.SymbolDoc)) { MessageBox.Show("�ĵ����Ѿ�����ͬ��ͼ�㡣", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Layer lar = Layer.CreateNew(dlg.InputString, this.SymbolDoc); lar.SetAttribute("layerType", dlg.InputType); if (ilist.Count > 0) { lar.SetAttribute("ParentID", ilist[0].ToString()); } addflag = true; //this.checkedListBox1.Items.Add(lar, true); //checkedListBox1.SelectedIndex = checkedListBox1.Items.Count - 1; DataTable dt = treeList1.DataSource as DataTable; SVG_LAYER _svg = new SVG_LAYER() { SUID = lar.ID, NAME = lar.Label }; if (treeList1.FocusedNode != null) { _svg.ParentID = treeList1.FocusedNode["ParentID"].ToString(); _svg.YearID = ilist[0].ToString(); _svg.svgID = symbolDoc.SvgdataUid; _svg.OrderID = int.Parse(treeList1.FocusedNode["OrderID"].ToString()) + 1; _svg.MDATE = DateTime.Now; Services.BaseService.Create<SVG_LAYER>(_svg); } DataRow row = dt.NewRow(); dt.Rows.Add(DataConverter.ObjectToRow(_svg, row)); //_svg.SUID = lar.ID; //_svg.NAME = lar.Label; //_svg.svgID = SVGUID; //_svg.XML = txt; //_svg.MDATE = System.DateTime.Now; //_svg.OrderID = ny * 100 + list.IndexOf(lar); //_svg.YearID = tems_id;// lar.GetAttribute("ParentID"); //_svg.IsChange = lar.GetAttribute("IsChange"); //_svg.visibility = lar.GetAttribute("visibility"); //_svg.layerType = lar.GetAttribute("layerType"); //_svg.IsSelect = lar.GetAttribute("IsSelect"); //Services.BaseService.Create<SVG_LAYER>(_svg); //if (this.checkedListBox1.SelectedIndex != -1) { // Layer layer = this.checkedListBox1.Items[this.checkedListBox1.SelectedIndex] as Layer; // if (checkedListBox1.GetItemCheckState(checkedListBox1.SelectedIndex) == CheckState.Checked) { // layer.Visible = true; // } else { // layer.Visible = false; // } //} //string guid=Guid.NewGuid().ToString(); //GraPowerRelation gra = new GraPowerRelation(); //gra.UID = Guid.NewGuid().ToString(); //gra.PowerEachID = guid; //gra.LayerID = lar.ID; //Services.BaseService.Create<GraPowerRelation>(gra); //SVG_LAYER layer = new SVG_LAYER(); //layer.SUID = lar.ID; //layer.svgID = symbolDoc.SvgdataUid; //layer.NAME = lar.Label; //layer.XML = txt; //layer.MDATE = System.DateTime.Now; //layer.OrderID = list.IndexOf(lar); //layer.YearID = lar.GetAttribute("ParentID"); //layer.IsChange = lar.GetAttribute("IsChange"); //layer.visibility = lar.GetAttribute("visibility"); //layer.layerType = lar.GetAttribute("layerType"); //layer.IsSelect = lar.GetAttribute("IsSelect"); //Services.BaseService.Create<SVG_LAYER>(_svg); } }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (lstList.SelectedItems.Count > 0) { string tmpselectedstring = lstList.SelectedItem.ToString(); int index = lstList.SelectedIndex; frmInput fi = new frmInput(); fi.Caption = Settings.ApplicationName + "-" + tmpselectedstring; fi.Label = "Change Text"; fi.Value = tmpselectedstring; if (fi.ShowDialog() == System.Windows.Forms.DialogResult.OK) { lstList.Items[lstList.SelectedIndex] = fi.Value; SaveWordsToFile(); } } }
private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { frmInput fi = new frmInput(); if (fi.ShowDialog() == DialogResult.OK) { parent.jobman.AddJob(new Job(fi.input, ActionType.Clone, this.parent.basepath)); parent.jobman.ExecuteAllJobs(); } }
private void btAdd_Click(object sender, EventArgs e) { frmInput dlg = new frmInput(); dlg.InputType = progtype; if (dlg.ShowDialog(this) == DialogResult.OK) { if (Layer.CkLayerExist(dlg.InputString, this.SymbolDoc)) { MessageBox.Show("�ĵ����Ѿ�����ͬ��ͼ�㡣", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Layer lar = Layer.CreateNew(dlg.InputString, this.SymbolDoc); lar.SetAttribute("layerType", dlg.InputType); if (ilist.Count > 0) { lar.SetAttribute("ParentID", ilist[0].ToString()); } addflag = true; this.checkedListBox1.Items.Add(lar, true); checkedListBox1.SelectedIndex = checkedListBox1.Items.Count - 1; if (this.checkedListBox1.SelectedIndex != -1) { Layer layer = this.checkedListBox1.Items[this.checkedListBox1.SelectedIndex] as Layer; if (checkedListBox1.GetItemCheckState(checkedListBox1.SelectedIndex) == CheckState.Checked) { layer.Visible = true; } else { layer.Visible = false; } } //string guid=Guid.NewGuid().ToString(); //GraPowerRelation gra = new GraPowerRelation(); //gra.UID = Guid.NewGuid().ToString(); //gra.PowerEachID = guid; //gra.LayerID = lar.ID; //Services.BaseService.Create<GraPowerRelation>(gra); //SVG_LAYER layer = new SVG_LAYER(); //layer.SUID = lar.ID; //layer.svgID = symbolDoc.SvgdataUid; //layer.NAME = lar.Label; //layer.XML = txt; //layer.MDATE = System.DateTime.Now; //layer.OrderID = list.IndexOf(lar); //layer.YearID = lar.GetAttribute("ParentID"); //layer.IsChange = lar.GetAttribute("IsChange"); //layer.visibility = lar.GetAttribute("visibility"); //layer.layerType = lar.GetAttribute("layerType"); //layer.IsSelect = lar.GetAttribute("IsSelect"); //Services.BaseService.Create<SVG_LAYER>(_svg); } }
private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { // TODO: This function is not tested and not implemented at the server side. // This function is coming soon! // The code in this routine is based on the code published on the web site: http://dobon.net/vb/dotnet/internet/webrequestpost.html frmInput fi = new frmInput(); string apikey, apikeyenc; RegistryKey regkey; regkey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\AutoGitClient", false); if (regkey != null) { apikeyenc = (string)regkey.GetValue("apikey", ""); regkey.Close(); if (apikeyenc != "") { apikey = StringEnc.DecryptString(apikeyenc, StringEnc.TransStr()); } else { apikey = ""; } } else { apikey = ""; } fi.input = apikey; if (fi.ShowDialog() == DialogResult.Cancel) { return; } apikey = fi.input; regkey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\AutoGitClient", true); if (regkey == null) { regkey = Registry.CurrentUser.CreateSubKey("SOFTWARE\\AutoGitClient"); } apikeyenc = StringEnc.EncryptString(apikey, StringEnc.TransStr()); regkey.SetValue("apikey", apikeyenc); regkey.Close(); // Set character code as UTF-8 System.Text.Encoding enc = System.Text.Encoding.GetEncoding("utf-8"); // Make string to send as POST string postData = "inlang=ja&word=" + System.Web.HttpUtility.UrlEncode("api_key:" + apikey, enc); byte[] postDataBytes = System.Text.Encoding.UTF8.GetBytes(postData); // Make an WebRequest System.Net.WebRequest req = System.Net.WebRequest.Create("http://www.fluxflex.com/connect/projects"); // Set the WebRequest req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength = postDataBytes.Length; // Get a stream to send POST data System.IO.Stream reqStream = req.GetRequestStream(); // Send data reqStream.Write(postDataBytes, 0, postDataBytes.Length); reqStream.Close(); // Make an WebResponse and receive data from the server. System.Net.WebResponse res = req.GetResponse(); System.IO.Stream resStream = res.GetResponseStream(); System.IO.StreamReader sr = new System.IO.StreamReader(resStream, enc); int i; string s = sr.ReadToEnd(); Console.WriteLine(sr.ReadToEnd()); sr.Close(); char[] splitter = new char[]{','}; string[] strs = s.Split(splitter); for (i = 0; i < strs.Length; i++) { parent.jobman.AddJob(new Job(strs[i], ActionType.Clone, this.parent.basepath)); } parent.jobman.ExecuteAllJobs(); }
private void btnProcessSend_Click(object sender, EventArgs e) { if (ValidateInput()) { clsSmartCashTransaction sc = new clsSmartCashTransaction(); sc.TransDate = DateTime.Now; sc.SenderName = txtSenderName.Text.Trim(); sc.SenderContact = txtSenderNum.Text.Trim(); sc.Load_Id = m_LoadAccount.LoadId; sc.Remarks = " "; sc.RecepientAccNum = " "; sc.UserId = myPosWide.m_user.UserId; if (tabCtrl.SelectedIndex == 0) { sc.TransType = SCashTranstype.SEND; sc.RecipientName = txtSSRecipientName.Text.Trim(); sc.RecipientContact = txtSSRecipientNum.Text.Trim(); sc.RecepientAccNum = txtSSSmartMoney.Text.Trim(); sc.RefNum = txtSSRefNum.Text; sc.TransAmount = double.Parse(txtSSAmount.Text.Trim()); sc.SvcFeeAmount = double.Parse(txtSSSvcFee.Text.Trim()); sc.Rebate = double.Parse(txtSSCommission.Text.Trim()); sc.Remarks = clsSmartCashTransaction.GetTransType(sc.TransType); frmInput input = new frmInput(); double amountdue = sc.TransAmount + sc.SvcFeeAmount; input.Title = "Payment"; input.Value = amountdue.ToString("0.00"); input.Caption = "Enter Tendered Amount"; if (input.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (Convert.ToDouble(input.Value) >= amountdue) { sc.TenderedAmount = Convert.ToDouble(input.Value); if (sc.Save()) { string ret = ""; Receipt or = new Receipt(); or.InitializePrinter(); List <string> strmsg = new List <string>(); ret += or.PrintCompanyHeader(); strmsg.Add("SMART MONEY"); strmsg.Add(sc.Remarks); ret += or.PrintHeader(strmsg, PrintFontAlignment.Center, PrintFontSize.UnderlineBold); strmsg.Clear(); strmsg.Add(string.Format("Cashier: {0}", myPosWide.m_user.UserName.ToUpper())); strmsg.Add(string.Format("Date: {0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); strmsg.Add(string.Format("TransId: {0}", sc.SCashTransId)); strmsg.Add(""); strmsg.Add(string.Format("Sender: {0:0.00}", sc.SenderName)); strmsg.Add(string.Format("Contact Num: {0:0.00}", sc.SenderContact)); strmsg.Add(string.Format("Recipient: {0:0.00}", sc.RecipientName)); strmsg.Add(string.Format("Contact: {0:0.00}", sc.RecipientContact)); strmsg.Add(string.Format("Smart Money: {0:0.00}", sc.RecepientAccNum)); strmsg.Add(string.Format("RefNum: {0:0.00}", sc.RefNum)); strmsg.Add(string.Format("Trans Amount: P {0:0.00}", sc.TransAmount)); strmsg.Add(string.Format("Service Fee: P {0:0.00}", sc.SvcFeeAmount)); strmsg.Add(string.Format("Total Amount: P {0:0.00}", amountdue)); strmsg.Add(string.Format("Tendered Amount: P {0:0.00}", sc.TenderedAmount)); strmsg.Add(string.Format("Change Amount: P {0:0.00}", sc.TenderedAmount - amountdue)); strmsg.Add(""); strmsg.Add(""); ret += or.PrintAppend(strmsg, PrintFontAlignment.Left, PrintFontSize.Regular); or.FormFeed(); or.OpenDrawer(); or.ExecPrint(ret); strmsg.Clear(); Clear(); m_LoadAccount = clsLoadAccount.GetLoadAccount(m_LoadAccount.LoadId); RefreshAccount(); } else { MessageBox.Show("Saving failed", "Save", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Amount entered is less than the Amount Due", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else if (tabCtrl.SelectedIndex == 1) { sc.TransType = SCashTranstype.ENCASH; if (optCash.Checked) { sc.PaymentMode = SCashPaymentMode.CASH; } else if (optSmartMoney.Checked) { sc.PaymentMode = SCashPaymentMode.SMARTMONEY; } sc.SenderAccnum = txtCSSmartMoney.Text; sc.RefNum = txtCSRefNum.Text; sc.TransAmount = double.Parse(txtCSAmount.Text.Trim()); sc.SvcFeeAmount = double.Parse(txtCSSvcFee.Text.Trim()); sc.Rebate = 0; // double.Parse(txtCSCommission.Text.Trim()); sc.TotalAmtTransfered = double.Parse(txtCSTotalAmtTrans.Text); if (MessageBox.Show(string.Format("You are about to deduct {0:0.00} from your actual cash on hand.\n\nAre you sure this is correct?", sc.TransAmount - sc.SvcFeeAmount), "Payment", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { if (sc.Save()) { if (clsUnclaimedCash.ClaimCash(sc.RefNum)) { UpdateList(); } string ret = ""; Receipt or = new Receipt(); or.InitializePrinter(); List <string> strmsg = new List <string>(); ret += or.PrintCompanyHeader(); strmsg.Add("SMART MONEY"); strmsg.Add(sc.Remarks); ret += or.PrintHeader(strmsg, PrintFontAlignment.Center, PrintFontSize.UnderlineBold); strmsg.Clear(); strmsg.Add(string.Format("Cashier: {0}", myPosWide.m_user.UserName.ToUpper())); strmsg.Add(string.Format("Date: {0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); strmsg.Add(string.Format("TransId: {0}", sc.SCashTransId)); strmsg.Add(""); strmsg.Add(string.Format("Sender: {0:0.00}", sc.SenderName)); strmsg.Add(string.Format("Contact Num: {0:0.00}", sc.SenderContact)); strmsg.Add(string.Format("Smart Money: {0:0.00}", sc.RecepientAccNum)); strmsg.Add(string.Format("RefNum: {0:0.00}", sc.RefNum)); strmsg.Add(string.Format("Trans Amount: P {0:0.00}", sc.TransAmount)); strmsg.Add(string.Format("Service Fee: P {0:0.00}", sc.SvcFeeAmount)); strmsg.Add(string.Format("Payout Amount: P {0:0.00}", sc.TransAmount - sc.SvcFeeAmount)); strmsg.Add(""); strmsg.Add(""); ret += or.PrintAppend(strmsg, PrintFontAlignment.Left, PrintFontSize.Regular); or.FormFeed(); or.OpenDrawer(); or.ExecPrint(ret); strmsg.Clear(); Clear(); RefreshAccount(); } } } } }
private void tsbAdviceEdit_Click(object sender, EventArgs e) { if (existAdvice()) { frmInput.text1 = aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Name; frmInput.text2 = aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Process; frmInput.text3 = aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Goal; frmInput inp = new frmInput(frmInput.FormType.mdAdvice, frmInput.FormMode.mdEdit); inp.ShowDialog(); if (inp.DialogResult == System.Windows.Forms.DialogResult.OK) { aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Name = frmInput.text1; aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Process = frmInput.text2; aspects[gvAspect.CurrentRow.Index].Advices[gvAdvice.CurrentRow.Index].Goal = frmInput.text3; updateGridViewAdvice(); } } }
private void bbteditfa_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TreeListNode node = treeList1.FocusedNode; if (node != null) { string suid = node["SUID"].ToString(); if (suid.Contains("FA")) { frmInput dlg = new frmInput(); dlg.Text = "������Ϣ"; dlg.hide = true; dlg.id = symbolDoc.SvgdataUid; dlg.symbolDoc = symbolDoc; dlg.InputString = node["NAME"].ToString(); dlg.InputType = progtype; DialogResult d = dlg.ShowDialog(this); if (d == DialogResult.OK) { SVG_LAYER temp = new SVG_LAYER(); temp.SUID = suid; temp.svgID = symbolDoc.SvgdataUid; SVG_LAYER lar = (SVG_LAYER)Services.BaseService.GetObject("SelectSVG_LAYERByKey", temp); // lar.YearID = dlg.list[1].ToString(); lar.NAME = dlg.InputString; Services.BaseService.Update<SVG_LAYER>(lar); PSP_ELCPROJECT pe = new PSP_ELCPROJECT(); pe.ID = lar.SUID; pe = Services.BaseService.GetOneByKey<PSP_ELCPROJECT>(pe); if (pe != null) { pe.Name = dlg.InputString; Services.BaseService.Update<PSP_ELCPROJECT>(pe); } treeList1.FocusedNode.SetValue("NAME", dlg.InputString); treeList1.Refresh(); //InitData(); } if (d == DialogResult.Retry) { if (dlg.list.Count > 1) { SVG_LAYER temp = new SVG_LAYER(); temp.SUID = suid; temp.svgID = symbolDoc.SvgdataUid; SVG_LAYER lar = (SVG_LAYER)Services.BaseService.GetObject("SelectSVG_LAYERByKey", temp); lar.YearID = dlg.list[1].ToString(); Services.BaseService.Update<SVG_LAYER>(lar); } } } else { MessageBox.Show("��ѡ�з�����", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } }
private void bbteditlayer_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Layer layer = getFocusLayer(); if (layer != null) { if (!CkRight(layer)) { MessageBox.Show("����ͼ�㲻�ܸ�����ɾ����", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } frmInput dlg = new frmInput(); dlg.id = symbolDoc.SvgdataUid; dlg.symbolDoc = symbolDoc; dlg.InputString = layer.Label; dlg.InputType = layer.GetAttribute("layerType"); DialogResult d = dlg.ShowDialog(this); if (d == DialogResult.OK) { layer.Label = dlg.InputString; layer.SetAttribute("layerType", dlg.InputType); treeList1.FocusedNode.SetValue("Name", dlg.InputString); treeList1.Refresh(); //InitData(); } if (d == DialogResult.Retry) { if (dlg.list.Count > 1) { layer.SetAttribute("ParentID", dlg.list[1].ToString()); SVG_LAYER temp = new SVG_LAYER(); temp.SUID = layer.ID; temp.svgID = symbolDoc.SvgdataUid; SVG_LAYER lar = (SVG_LAYER)Services.BaseService.GetObject("SelectSVG_LAYERByKey", temp); lar.YearID = dlg.list[1].ToString(); Services.BaseService.Update<SVG_LAYER>(lar); } } } }