//打印发货单或快递单 public static void PrintOrder(Guid templateModelID, OrderPrintDataDTO orderPrintDataDto, string printerName, DataEntity.PrintType printType, YesOrNo isGlass, PrintAbout printAbout) { if (printAbout == PrintAbout.Order && (printType == DataEntity.PrintType.Manual || printType == DataEntity.PrintType.Again)) { WMSService.CurrentWMSService.RecordPrinted(orderPrintDataDto.DownGoodsBillNo); } CurrentPrintPage.About = printAbout; //打印数据初始化 PrintEditResultModel perm = GetModel(templateModelID); CurrentPrintPage.PrintEntity = EntityConvert <OrderDetailPrintDataDTO> .Objs2Fields(perm, Machining.MachiningOrder(orderPrintDataDto)); perm.Extends.Add("PrintType", printType); //纸张设置默认 if (CurrentPrintPage.PrintEntity.PageModel != null) { CurrentPrintPage.DefaultPageSettings.PaperSize = new PaperSize( CurrentPrintPage.PrintEntity.PageModel.PageName, CommonFunction.Millimeter2Pix(CurrentPrintPage.PrintEntity.PageModel.Width), CommonFunction.Millimeter2Pix(CurrentPrintPage.PrintEntity.PageModel.Height)); } // 打印机名称 CurrentPrintPage.PrinterSettings.PrinterName = printerName; CurrentPrintPage.DocumentName = printIndex++.ToString(); if (CurrentPrintPage.PrinterSettings.IsValid) { CurrentPrintPage.Print(); } }
public void inTilData( ) { this.actionUP(); this.card = val.card; this.visa = val.visa; visibility = Visibility.Visible; tashiravis = Visibility.Visible; edittashiravis = Visibility.Collapsed; if (val.visa != null) { visibility = Visibility.Collapsed; edittashiravis = Visibility.Visible; tashiravis = Visibility.Collapsed; visa = val.visa; } tashira = new Command(() => { OpenSample4Dialog(); Sample4Content = new YesOrNo(" إذا أضفت التأشيرة لن تستطيع تعديل على بينات العملية , الرجاء والتأكد قبل ذالك ", () => { OpenSample4Dialog(); Sample4Content = new Addtashira_7isabi(val, AcceptSample4Dialog, CancelSample4Dialog); }, CancelSample4Dialog); }); edittashira = new Command(() => { Sample4Content = new Edittashira_7isabi(val, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); }); }
public virtual void Quit() { if (YesOrNo.Ask("Are you sure you want to quit?")) { IsDone = true; } }
public async Task AfterIsEditor(IDialogContext context, IAwaitable <YesOrNo> result) { YesOrNo response = await result; IsEditor = response; if (response.ToString().ToLower() == "no") { PromptDialog.Choice( context: context, resume: SendToCMSForm, prompt: "If you are not an editor, you'll have to fill a form for CMS authorization. Would you like me to fill out the form for you?", options: (IEnumerable <YesOrNo>)Enum.GetValues(typeof(YesOrNo)), retry: "Please select one of the choices.", promptStyle: PromptStyle.Auto ); } else { PromptDialog.Choice( context: context, resume: AfterWhichCampus, prompt: "Are you trying to login from the office or off campus? ", options: (IEnumerable <CampusOptions>)Enum.GetValues(typeof(CampusOptions)), retry: "Please select one of the choices.", promptStyle: PromptStyle.Auto ); } }
public processesViewModel() { actionUP = () => { this.processes = new ObservableCollection <processesViewMODEL>(Ico.getValue <db>().GetUnivdb().processes.ToList().Select(p => new processesViewMODEL(p) { removeaction = () => { Sample4Content = new YesOrNo("هل أنت مـأكد من قيامك بحذف هذه العملية ؟ , لا يمكن التراجع عن هذه العملية ", async() => { AcceptSample4Dialog(); await Task.Run(() => { Ico.getValue <db>().GetUnivdb().processes.Remove(Ico.getValue <db>().GetUnivdb().processes.ToList().Where(pro => pro.Id == p.Id).ToList().FirstOrDefault()); CancelSample4Dialog(); }); }, () => { CancelSample4Dialog(); }); } })); }; inTilData(); Count = processes.Count; Serech = new CommandPar((t) => { var text = (string)t; processes = new ObservableCollection <processesViewMODEL>(Ico.getValue <db>().GetUnivdb().processes.ToList().Select(p => new processesViewMODEL(p)).Where((l) => l.Code.Contains(text) || l.Name.Contains(text))); }); new_ = new Command(() => { // MainViewModel.page = new NewProcesses(); Ico.getValue <ContentApp>().page = new NewProcesses(); }); }
/// <summary> /// Constructor for Yes or No warning form /// </summary> /// <param name="warningString">The warning displayed to the user.</param> public YesNoWarning(String warningString, YesOrNo c) { Option = c; InitializeComponent(); label1.Text = warningString; this.Width = label1.Width + 20; }
public void inTilData() { this.actionUP(); this.name = val.Name; this.code = val.Code; this.num = val.num; var lc = val.cards; if (lc.ToList().Count > 0) { var a = lc.ToList().Where(c => c.card_7isab.Count > 0).FirstOrDefault(); if (a != null) { if (a.card_7isab?.ToList().FirstOrDefault() != null) { visibility = Visibility.Collapsed; } } } this.date = val.date.GetDateTimeFormats()[0]; this.nowcost = val.NewCost; parts = new ObservableCollection <ItemPart>(val.parts.ToList().Select(p => new ItemPart(p) { action = (t) => { OpenSample4Dialog(); Sample4Content = new YesOrNo("هل أنت متأكد من قيامك بحذف هذه الحصة من العملية ,لا يمكن التراجع عن الحذف", async() => { AcceptSample4Dialog(); await Task.Run(() => { Ico.getValue <db>().GetUnivdb().parts.Remove(Ico.getValue <db>().GetUnivdb().parts.ToList().Where(pr => pr.Id == p.Id).FirstOrDefault()); CancelSample4Dialog(); }); parts.Remove(t); }, () => { CancelSample4Dialog(); }); }, action_kanoni = () => { var card = Ico.getValue <db>().GetUnivdb().card_kanoni.ToList().Where(c => c.id_part == p.Id).FirstOrDefault(); if (card == null) { Sample4Content = new AddPartCard(p, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); } else { Ico.getValue <ContentApp>().page = new Viewkanoni(card); } } })); }
public bool @__Expr2Get() { #line 70 "C:\USERS\NEZIR\DESKTOP\GITHUBREPOSITORY\TEST\BUILDINGAFLOWCHARTWORKFLOW\BUILDINGAFLOWCHARTWORKFLOW\MACHINEINFOWF.XAML" return (YesOrNo.ToUpper() == "Y"); #line default #line hidden }
public void inTilData( ) { this.actionUP(); this.card = val.card; this.visa = val.visa; visibility = Visibility.Visible; tashiravis = Visibility.Visible; edittashiravis = Visibility.Collapsed; if (val.visa != null) { visibility = Visibility.Collapsed; edittashiravis = Visibility.Visible; tashiravis = Visibility.Collapsed; visa = val.visa; } tashira = new Command(() => { OpenSample4Dialog(); Sample4Content = new YesOrNo(" إذا أضفت التأشيرة لن تستطيع تعديل على بيانات العملية , الرجاء والتأكد قبل ذالك ", () => { OpenSample4Dialog(); Sample4Content = new Addtashira_7isabi(val, AcceptSample4Dialog, CancelSample4Dialog); }, CancelSample4Dialog); }); edittashira = new Command(() => { Sample4Content = new Edittashira_7isabi(val, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); }); open = new Command(async() => { OpenSample4Dialog(); AcceptSample4Dialog(); await Task.Run(() => { ExcelHlper.OpenFile(val.card.location); CancelSample4Dialog(); }); }); print = new Command(async() => { OpenSample4Dialog(); AcceptSample4Dialog(); await Task.Run(() => { ExcelHlper.PrintFile(val.card.location); CancelSample4Dialog(); }); }); }
private void Delete(object sender, RoutedEventArgs e) { if (Cards.Children.Count > 0) { var currentCard = (Button)this.Cards.Children[Config.LastOpen]; var question = new YesOrNo(Config.LanguageSet.DeleteQuestion + " " + currentCard.Content + "?", Config); question.ShowDialog(); if (question.DialogResult.Value) { new SaveSystem().Delete(currentCard.Content.ToString()); new MainWindowViewModel().LoadObjects(this, Config); } } }
public ObservableCollection <ItemDafa3> CreateItem() { return(new ObservableCollection <ItemDafa3>(part.part.card_dafa3.Select(ct => new ItemDafa3(ct) { Viewdafa3VewModel = this, end = CancelSample4Dialog, action = (t) => { OpenSample4Dialog(); Sample4Content = new YesOrNo("هل أنت متأكد من قيامك بحذف هذه الحصة من العملية ,لا يمكن التراجع عن الحذف", async() => { AcceptSample4Dialog(); await Task.Run(() => { Ico.getValue <db>().GetUnivdb().parts.ToList().Where(c => c.Id == ct.id_part).ToList().SingleOrDefault().nowcost -= t; Ico.getValue <db>().GetUnivdb().card_dafa3.Remove(Ico.getValue <db>().GetUnivdb().card_dafa3.ToList().Where(c => c.Id == ct.Id).FirstOrDefault()); Ico.getValue <db>().savedb(); CancelSample4Dialog(); }); }, () => { CancelSample4Dialog(); }); }, action_edit = (t) => { Sample4Content = new Editdafa3(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); this.inTilData(); }, addtswiya = (t) => { OpenSample4Dialog(); Sample4Content = new YesOrNo(" إذا أضفت التسوية لن تستطيع التراجع عن البطاقة, الرجاء والتأكد قبل ذالك ", () => { OpenSample4Dialog(); Sample4Content = new Addtswiya(t, AcceptSample4Dialog, CancelSample4Dialog); }, CancelSample4Dialog); }, edittswiyaaction = (t) => { Sample4Content = new Edittswiya(t, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); } }))); }
/// <summary> /// 修改指定商品采购状态 /// </summary> /// <param name="yesno"></param> /// <param name="purchasingGoodsID"></param> public void UpdateGoodState(YesOrNo yesno, Guid purchasingGoodsID) { var parms = new[] { new SqlParameter(PARM_STATE, SqlDbType.Int), new SqlParameter(PARM_PURCHASING_GOODS_ID, SqlDbType.UniqueIdentifier) }; parms[0].Value = (int)yesno; parms[1].Value = purchasingGoodsID; try { SqlHelper.ExecuteNonQuery(GlobalConfig.ERP_DB_NAME, false, SQL_UPDATE_GOOD_STATE, parms); } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
public async Task SendToCMSForm(IDialogContext context, IAwaitable <YesOrNo> result) { YesOrNo res = await result; if (res.ToString().ToLower() == "no") { PromptDialog.Choice( context: context, resume: AfterFurtherAssistance, prompt: "Do you still require help with this issue? ", options: (IEnumerable <YesOrNo>)Enum.GetValues(typeof(YesOrNo)), retry: "Please select one of the choices.", promptStyle: PromptStyle.Auto ); } else { var myform = new FormDialog <CMSFormRequest>(new CMSFormRequest(), CMSFormRequest.BuildForm, FormOptions.PromptInStart, null); context.Call(myform, AfterCMSFormComplete); } }
private static void EnumBasic() { // 枚举 => 转字符串 string yesString = YesOrNo.Yes.ToString(); // Yes // 枚举 => 转数字 int yesInt = (int)YesOrNo.Yes; // 1 // 字符串 => 枚举 YesOrNo yesOrNo_Yes = (YesOrNo)Enum.Parse(typeof(YesOrNo), "Yes"); // YesOrNo.Yes // 数字 => 枚举 YesOrNo yesOrNo_No = (YesOrNo)2; // YesOrNo.No // 获取所有的枚举成员 Array yesOrNos = Enum.GetValues(typeof(YesOrNo)); // [YesOrNo.None,YesOrNo.Yes,YesOrNo.No] // 获取所有枚举成员的属性名 string[] yesOrNoNames = Enum.GetNames(typeof(YesOrNo)); // ["None","Yes","No"] // 获取枚的举基础类型 Type typeInt = Enum.GetUnderlyingType(typeof(YesOrNo)); // System.Int32 Type typeByte = Enum.GetUnderlyingType(typeof(YesOrNo_Byte)); // System.Byte }
public ExitWarning(YesOrNo yon) { temp = yon; InitializeComponent(); }
public static void Dead() { const string youDied = "*** You have died ***"; Global.Deaths++; // this is models after the inform source which is why it's not just a private variable here int score = -10; Output.Print("\n\n"); //TODO: implement caves_closed //if (caves_closed) // "It looks as though you're dead. Well, seeing as how it's so close to closing time anyway, // I think we'll just call it a day."; switch (Global.Deaths) { case 1: Output.Print("Oh dear, you seem to have gotten yourself killed. " + "I might be able to help you out, but I've never really done this before. " + "Do you want me to try to reincarnate you?"); break; case 2: Output.Print("You clumsy oaf, you've done it again! " + "I don't know how long I can keep this up. " + "Do you want me to try reincarnating you again?"); break; case 3: Output.Print("Now you've really done it! I'm out of orange smoke! " + "You don't expect me to do a decent reincarnation without any orange smoke, do you?"); break; } Output.Print("\n\n"); var yes = YesOrNo.Ask(); if (yes) { switch (Global.Deaths) { case 1: Output.Print( "All right. But don't blame me if something goes wr......" + "\n\n\n\n---POOF!!---" + "\n\r\nYou are engulfed in a cloud of orange smoke." + "Coughing and gasping, you emerge from the smoke and find that you're....\n"); break; case 2: Output.Print("Okay, now where did I put my orange smoke?.... >POOF!<" + "\n\r\nEverything disappears in a dense cloud of orange smoke.\n"); break; case 3: Output.Print("Okay, if you're so smart, do it yourself! I'm leaving!"); Display(youDied); Context.Story.IsDone = true; return; } // lamp is moved to At End of Road var lamp = ObjectMap.Remove <BrassLantern>(); lamp.On = false; lamp.Light = false; var endOfRoad = Rooms.Get <EndOfRoad>(); ObjectMap.MoveObject(lamp, endOfRoad); // remaining inventory items are dropped in the room where you died foreach (var obj in Inventory.Items) { if (obj is Treasure) { score -= 5; } } foreach (var item in Inventory.Items) { ObjectMap.MoveObject(item, CurrentRoom.Location); } Inventory.Items.Clear(); MovePlayer.To <InsideBuilding>(); Score.Add(score, true); // Not sure what this is doing // remove dwarf; } else { switch (Global.Deaths) { case 1: Output.Print("Very well."); break; case 2: Output.Print("Probably a wise choice."); break; case 3: Output.Print("I thought not!"); break; } Display(youDied); Context.Story.IsDone = true; } }
public processesViewModel() { actionUP = () => { this.processes = new ObservableCollection <processesViewMODEL>(Ico.getValue <db>().GetUnivdb().processes.ToList().Select(p => new processesViewMODEL(p) { removeaction = () => { OpenSample4Dialog(); Sample4Content = new YesOrNo("هل أنت مـتأكد من قيامك بحذف هذه العملية ؟ , لا يمكن التراجع عن هذه الحذف ", async() => { AcceptSample4Dialog(); await Task.Run(() => { var ps = Ico.getValue <db>().GetUnivdb().processes.ToList().Where(pro => pro.Id == p.Id).ToList().FirstOrDefault(); foreach (var i in ps.cards.ToList()) { Ico.getValue <db>().GetUnivdb().card_7isab.AddRange(i.card_7isab); } foreach (var i in ps.cards.ToList()) { Ico.getValue <db>().GetUnivdb().card_kanoni.AddRange(i.card_kanoni); } foreach (var i in ps.cards.ToList()) { Ico.getValue <db>().GetUnivdb().card_mo7sabi.AddRange(i.card_mo7sabi); } foreach (var i in ps.cards.ToList()) { foreach (var ic in ps.parts.ToList()) { Ico.getValue <db>().GetUnivdb().card_dafa3.RemoveRange(ic.card_dafa3); Ico.getValue <db>().GetUnivdb().p_sa7ab.RemoveRange(ic.p_sa7ab); } Ico.getValue <db>().GetUnivdb().card_sa7ab.AddRange(i.card_sa7ab); } Ico.getValue <db>().GetUnivdb().cards.RemoveRange(ps.cards); Ico.getValue <db>().GetUnivdb().parts.RemoveRange(ps.parts); Ico.getValue <db>().GetUnivdb().processes.Remove(ps); Ico.getValue <db>().savedb(); CancelSample4Dialog(); inTilData(); }); }, () => { CancelSample4Dialog(); }); } })); }; inTilData(); Count = processes.Count; Serech = new CommandPar((t) => { var text = (string)t; processes = new ObservableCollection <processesViewMODEL>(Ico.getValue <db>().GetUnivdb().processes.ToList().Select(p => new processesViewMODEL(p) { removeaction = () => { OpenSample4Dialog(); Sample4Content = new YesOrNo("هل أنت مـنأكد من قيامك بحذف هذه العملية ؟ , لا يمكن التراجع عن هذه الحذف ", async() => { AcceptSample4Dialog(); await Task.Run(() => { Ico.getValue <db>().GetUnivdb().processes.Remove(Ico.getValue <db>().GetUnivdb().processes.ToList().Where(pro => pro.Id == p.Id).ToList().FirstOrDefault()); Ico.getValue <db>().savedb(); CancelSample4Dialog(); inTilData(); }); }, () => { CancelSample4Dialog(); }); } } ).Where((l) => l.Code.Contains(text) || l.Name.Contains(text)) ); }); new_ = new Command(() => { // MainViewModel.page = new NewProcesses(); Ico.getValue <ContentApp>().page = new NewProcesses(); }); }
public void Awake() { Instance = this; DontDestroyOnLoad(this); }
private async Task MessageReceivedAsync(IDialogContext context, IAwaitable <object> result) { var activity = await result as Activity; // small delay show that bot is typing await Task.Delay(1000); // upload the recipe if (activity.Attachments.Count > 0) { await context.PostAsync($"Great. I see you stayed in Duck House from xx til xxx. And you had breakfast included. "); await context.PostAsync($"On what dates did you start and end your trip? (dd / mm / yyyy – dd / mm / yyyy) "); } else { UserModel user = new UserModel(); context.UserData.TryGetValue <UserModel>("SaveUserInfo", out user); switch (user.nextState) { case "costCentre": user.costCentre = activity.Text; user.nextState = "details"; await context.PostAsync("Give a name to your trip"); break; case "details": user.details = activity.Text; user.nextState = "location"; await context.PostAsync($"Ok. Thanks, {user.firstName}."); await context.PostAsync($"Where did you travel to?"); break; case "location": user.location = activity.Text; user.nextState = "date"; await context.PostAsync($"Why on earth would you go there?! ;) Just kidding."); await context.PostAsync($"Please upload your reservation confirmation."); break; case "date": user.date = activity.Text; user.nextState = "timeFrom"; await context.PostAsync($"What time did you start your trip? (00:00 24h)"); break; case "timeFrom": user.timeFrom = activity.Text; user.nextState = "timeTo"; await context.PostAsync($"And what time did you arrive back? (00:00 24h)"); break; case "timeTo": user.timeTo = activity.Text; user.nextState = "Transport"; var card = AdditionalCard.GetAdaptiveCard(); Attachment attachment = new Attachment() { ContentType = AdaptiveCard.ContentType, Content = card }; IMessageActivity messageActivity = context.MakeMessage(); messageActivity.Attachments.Add(attachment); await context.PostAsync(messageActivity); break; case "Transport": user.nextState = "Yes"; await context.PostAsync("Well done. You‘re almost there.Can you please check if the information displayed is correct?"); var yesCard = YesOrNo.GetAdaptiveCard(user); Attachment yesAttachment = new Attachment() { ContentType = AdaptiveCard.ContentType, Content = yesCard }; IMessageActivity yesMessageActivity = context.MakeMessage(); yesMessageActivity.Attachments.Add(yesAttachment); await context.PostAsync(yesMessageActivity); break; case "Yes": user.nextState = "email"; await context.PostAsync("Perfect!You‘re my hero, you made my life so much easier!"); await context.PostAsync("Please can you type your email I will send all informations via Email!"); break; case "email": user.nextState = "end"; string data = user.firstName + user.costCentre + " " + user.details + " " + user.location + " " + user.date + " " + user.timeFrom + " " + user.timeTo + " "; Email.SendMail(user.firstName, data, activity.Text); await context.PostAsync($"Email was sent :)"); break; default: await context.PostAsync("Sorry , I couldn't understand you , can you try again?"); break; } context.UserData.SetValue <UserModel>("SaveUserInfo", user); } context.Wait(MessageReceivedAsync); }
internal System.Linq.Expressions.Expression @__Expr2GetTree() { #line 70 "C:\USERS\NEZIR\DESKTOP\GITHUBREPOSITORY\TEST\BUILDINGAFLOWCHARTWORKFLOW\BUILDINGAFLOWCHARTWORKFLOW\MACHINEINFOWF.XAML" System.Linq.Expressions.Expression <System.Func <bool> > expression = () => YesOrNo.ToUpper() == "Y"; #line default #line hidden return(base.RewriteExpressionTree(expression)); }