private void llbTools_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems != null && e.AddedItems.Count > 0) { BasicTool tool = e.AddedItems[0] as BasicTool; if (tool != null) { this.DrawingCanvas.EditingMode = tool.Mode; } } }
public CountFx GetCount(DateTime sDate, DateTime eDate, int srcUid) { CountFx ca = new CountFx() { userCount = 0, airOrderCount = 0, airFareCount = 0, insuranceCount = 0, airPrice = 0, refundCount = 0, userCancel = 0 }; //新增用户 try { ca.userCount = Convert.ToInt16(helper.GetOne("select count(id) as t from t_user where srcUid = " + srcUid + " and date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "'")); ca.userCancel = Convert.ToInt16(helper.GetOne("select count(id) as t from t_user where srcUid = " + srcUid + " and date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and isSubscribe = 0")); } catch { ca.userCount = 0; ca.userCancel = 0; } //机票票数 try { string airInfo = BasicTool.webRequest("http://59.49.19.109:8016/weixin/WxHandler.ashx?Fn=11&srcUid=" + srcUid + "&sDate=" + sDate.ToString("yyyy-MM-dd") + "&eDate=" + eDate.ToString("yyyy-MM-dd")); if (airInfo.Length > 0 && airInfo.IndexOf("|") > -1) { ca.airOrderCount = Convert.ToInt16(airInfo.Split('|')[0]); ca.airFareCount = Convert.ToInt16(airInfo.Split('|')[1]); ca.insuranceCount = Convert.ToInt32(airInfo.Split('|')[2]); ca.airPrice = Convert.ToInt32(airInfo.Split('|')[3]); ca.refundCount = Convert.ToInt16(airInfo.Split('|')[4]); } } catch { ca.airOrderCount = 0; ca.airFareCount = 0; ca.insuranceCount = 0; ca.airPrice = 0; ca.refundCount = 0; } return(ca); }
public static DbHelper GetHelper() { DbHelper helper = null; if (HelperList.Count < 5) { helper = new MySqlHelper(BasicTool.GetConnectionstring("WeiXinFix")); HelperList.Add(helper); } else { Random r = new Random(DateTime.Now.Millisecond); helper = HelperList[r.Next(0, 4)]; } return(helper); }
private void textButton_Click(object sender, EventArgs e) { selectedTool = BasicTool.Text; }
private void button2_Click(object sender, EventArgs e) { selectedTool = BasicTool.Brush; // this.Host.Feedback(selectedTool, this); }
private void selectButton_Click(object sender, EventArgs e) { selectedTool = BasicTool.RectangleSelection; }
private void penButton_Click(object sender, EventArgs e) { selectedTool = BasicTool.Pencil; }
public CountAll GetCount(DateTime sDate, DateTime eDate) { CountAll ca = new CountAll() { userCount = 0, userCountNo = 0, searchCount = 0, shareF = 0, shareP = 0, trainSearchCount = 0, airOrderCount = 0, airFareCount = 0, trainOrderCount = 0, trainFareCount = 0, hotelOrderCount = 0, hotelRoomsCount = 0, hotelSearchCount = 0 }; //新增用户 try { ca.userCount = Convert.ToInt16(helper.GetOne("select count(id) as t from t_user where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "'")); } catch { ca.userCount = 0; } //新增用户(未关注) try { ca.userCountNo = Convert.ToInt16(helper.GetOne("select count(id) as t from t_user where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and isSubscribe = 0")); } catch { ca.userCountNo = 0; } //查询统计 try { ca.searchCount = Convert.ToInt16(helper.GetOne("select count(id) as t from t_search_log where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and sType = 0")); } catch { ca.searchCount = 0; } //火车查询统计 try { ca.trainSearchCount = Convert.ToInt16(helper.GetOne("select count(id) as t from t_search_log where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and sType = 1")); } catch { ca.trainSearchCount = 0; } //酒店查询统计 try { ca.hotelSearchCount = Convert.ToInt16(helper.GetOne("select count(id) as t from t_search_log where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and sType = 2")); } catch { ca.hotelSearchCount = 0; } //特价分享 try { ca.shareF = Convert.ToInt16(helper.GetOne("select count(id) as t from t_share where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and fType = 0")); } catch { ca.shareF = 0; } //特价发给朋友 try { ca.shareP = Convert.ToInt16(helper.GetOne("select count(id) as t from t_share where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and fType = 1")); } catch { ca.shareP = 0; } //火车票订单 try { ca.trainOrderCount = Convert.ToInt16(helper.GetOne("SELECT count(id) as t from t_train_order where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and state = 3 and uId > 0")); } catch { ca.trainOrderCount = 0; } //火车票票数 try { ca.trainFareCount = Convert.ToInt16(helper.GetOne("SELECT sum(fareNum) as t from t_train_order where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "' and state = 3 and uId > 0")); } catch { ca.trainFareCount = 0; } //酒店订单 try { ca.hotelOrderCount = Convert.ToInt16(helper.GetOne("SELECT count(id) as t from hotel_order where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "'")); } catch { ca.hotelOrderCount = 0; } //酒店房间数 try { ca.hotelRoomsCount = Convert.ToInt16(helper.GetOne("SELECT sum(NumberOfRooms) as t from hotel_order where date(addOn) >='" + sDate.ToString("yyyy-MM-dd") + "' and date(addOn) <='" + eDate.ToString("yyyy-MM-dd") + "'")); } catch { ca.hotelRoomsCount = 0; } //机票票数 try { string airInfo = BasicTool.webRequest("http://59.49.19.109:8016/weixin/WxHandler.ashx?Fn=10&sDate=" + sDate.ToString("yyyy-MM-dd") + "&eDate=" + eDate.ToString("yyyy-MM-dd")); if (airInfo.Length > 0 && airInfo.IndexOf("|") > -1) { ca.airOrderCount = Convert.ToInt16(airInfo.Split('|')[0]); ca.airFareCount = Convert.ToInt16(airInfo.Split('|')[1]); } } catch { ca.airOrderCount = 0; ca.airFareCount = 0; } return(ca); }