public Form_OrderManage() { InitializeComponent(); UserManager_Client = (UserManagerClient)ClientFactory.GetClient(ClientType.Type.UserManager); Type_Client = (TypeClient)ClientFactory.GetClient(ClientType.Type.Type); Action_Client = (ActionClient)ClientFactory.GetClient(ClientType.Type.Action); Version_Client = (VersionClient)ClientFactory.GetClient(ClientType.Type.Version); Order_Client = (OrderClient)ClientFactory.GetClient(ClientType.Type.Order); OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); ShopID = GlobalParams.ShopID; if (ShopID < 0) { MessageBox.Show("您不属于任何店铺,请联系系统管理员分配您的店铺所属!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); this.Close(); } else { List_Version = Version_Client.SelectAllVersions().Where(P => P.Version_Shop == ShopID).ToList(); } List_Action = Action_Client.SelectAllActions().ToList(); List_Type = Type_Client.SelectAllTypes().ToList(); List_UserEX = UserManager_Client.SelectUserEXInfo_All().ToList(); List_User = UserManager_Client.SelectUserInfo_All().ToList(); PL_NewUser.Visible = false; PL_UserResult.Visible = false; Bind_Action(); Bind_Type(); Bind_Version(); }
public Form_SelectOrder() { InitializeComponent(); OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); GetCar_Client = (GetCarClient)ClientFactory.GetClient(ClientType.Type.GetCar); ShopID = GlobalParams.ShopID; if (ShopID < 0) { MessageBox.Show("您不属于任何店铺,请联系系统管理员分配您的店铺所属!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); this.Close(); } List_Order = OrderSummery_Client.SelectOrderSummerys_ShopID(ShopID, null, null).ToList(); }
public Form_VersionInfo(int ShopID, int VersionID, string[] starttime, string[] endtime) { InitializeComponent(); CarSummery_Client = (CarSummeryClient)ClientFactory.GetClient(ClientType.Type.CarSummery); OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); Car_ViewModel SelectCar = CarSummery_Client.SelectAllCar().Where(P => P.Version_ID == VersionID).Single(); int Versiontotal = SelectCar.Version_Count; int Car_Count = OrderSummery_Client.SelectRentaledCarCount_TimeAndVersion( ShopID, VersionID, Convert.ToInt32(starttime[0]), Convert.ToInt32(starttime[1]), Convert.ToInt32(starttime[2]), Convert.ToInt32(endtime[0]), Convert.ToInt32(endtime[1]), Convert.ToInt32(endtime[2]) ); int nokosite = Versiontotal - Car_Count; Label_BaseKM.Text = SelectCar.Version_BaseKM.ToString(); Label_Brand.Text = SelectCar.Brand_Name.ToString(); Label_Count.Text = nokosite.ToString(); Label_Info.Text = SelectCar.Version_Info; Label_Person.Text = SelectCar.Version_Person.ToString(); Label_PriceDeposit.Text = SelectCar.Version_Price_Deposit.ToString(); Label_PriceMemberCatch.Text = SelectCar.Version_Price_Member_Catch.ToString(); Label_PriceMemberRental.Text = SelectCar.Version_Price_Member_Rental.ToString(); Label_PriceNormalCatch.Text = SelectCar.Version_Price_Normal_Catch.ToString(); Label_PriceNormalRental.Text = SelectCar.Version_Price_Normal_Rental.ToString(); Label_PriceOver.Text = SelectCar.Version_Price_Over.ToString(); Label_PriceOverRiding.Text = SelectCar.Version_Price_Over_Riding.ToString(); Label_PriceRiding.Text = SelectCar.Version_Price_Riding.ToString(); Label_Type.Text = SelectCar.Type_Name; Label_Version.Text = SelectCar.Version_Name; try { string[] imgArr = SelectCar.Version_IMG.ToString().Split(new char[] { ',' }); byte[] bty = Array.ConvertAll <string, byte>(imgArr, delegate(string s) { return(byte.Parse(s)); }); Bitmap bmp = new Bitmap(bty.FromBytes(520, null)); PB_Pic.Image = bmp; } catch { MessageBox.Show("载入图片出现错误,请重新上传图片更新数据库或联系管理员!", "错误!!", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
public Form_CancelOrder(int OrderID) { InitializeComponent(); this.OrderID = OrderID; OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); SelectOrder = OrderSummery_Client.SelectOrderSummery_OrderID(OrderID); Label_Count1.Text = SelectOrder.Order_Count.ToString(); Label_PriceDeposit.Text = SelectOrder.Version_Price_Deposit.ToString(); decimal TotalDeposit = SelectOrder.Version_Price_Deposit * SelectOrder.Order_Count; Label_TotalDeposit.Text = TotalDeposit.ToString(); Label_Count2.Text = SelectOrder.Order_Count.ToString(); Label_CastPrice.Text = "1000"; decimal TotalCast = 1000 * SelectOrder.Order_Count; Label_TotalCast.Text = TotalCast.ToString(); Label_Total.Text = (TotalDeposit - TotalCast).ToString(); }
public Form_LastCheck(int OrderID) { InitializeComponent(); OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); this.OrderID = OrderID; }
/// <summary> /// 客户端服务实例产生器 /// </summary> /// <param name="type">产生的服务类型</param> /// <returns></returns> private static object build(ClientType.Type type) { switch (type) { case ClientType.Type.Account: { AccountClient temp = new AccountClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <AccountClient>(type, temp); return(temp); } case ClientType.Type.Action: { ActionClient temp = new ActionClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <ActionClient>(type, temp); return(temp); } case ClientType.Type.Brand: { BrandClient temp = new BrandClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <BrandClient>(type, temp); return(temp); } case ClientType.Type.CarSummery: { CarSummeryClient temp = new CarSummeryClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <CarSummeryClient>(type, temp); return(temp); } case ClientType.Type.Checkout: { CheckoutClient temp = new CheckoutClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <CheckoutClient>(type, temp); return(temp); } case ClientType.Type.City: { CityClient temp = new CityClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <CityClient>(type, temp); return(temp); } case ClientType.Type.Order: { OrderClient temp = new OrderClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <OrderClient>(type, temp); return(temp); } case ClientType.Type.OrderSummery: { OrderSummeryClient temp = new OrderSummeryClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <OrderSummeryClient>(type, temp); return(temp); } case ClientType.Type.Province: { ProvinceClient temp = new ProvinceClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <ProvinceClient>(type, temp); return(temp); } case ClientType.Type.RAP: { RAPClient temp = new RAPClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <RAPClient>(type, temp); return(temp); } case ClientType.Type.Salary: { SalaryClient temp = new SalaryClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <SalaryClient>(type, temp); return(temp); } case ClientType.Type.SalaryAppend: { SalaryAppendClient temp = new SalaryAppendClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <SalaryAppendClient>(type, temp); return(temp); } case ClientType.Type.SalaryInfoSummery: { SalaryInfoSummeryClient temp = new SalaryInfoSummeryClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <SalaryInfoSummeryClient>(type, temp); return(temp); } case ClientType.Type.SalaryLog: { SalaryLogClient temp = new SalaryLogClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <SalaryLogClient>(type, temp); return(temp); } case ClientType.Type.Shop: { ShopClient temp = new ShopClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <ShopClient>(type, temp); return(temp); } case ClientType.Type.Type: { TypeClient temp = new TypeClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <TypeClient>(type, temp); return(temp); } case ClientType.Type.Version: { VersionClient temp = new VersionClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <VersionClient>(type, temp); return(temp); } case ClientType.Type.WorkRAP: { WorkRAPClient temp = new WorkRAPClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <WorkRAPClient>(type, temp); return(temp); } case ClientType.Type.UserManager: { UserManagerClient temp = new UserManagerClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <UserManagerClient>(type, temp); return(temp); } case ClientType.Type.UserSummery: { UserSummeryClient temp = new UserSummeryClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <UserSummeryClient>(type, temp); return(temp); } case ClientType.Type.GetCar: { GetCarClient temp = new GetCarClient(); UserNamePasswordClientCredential UNPCC = temp.ClientCredentials.UserName; UNPCC.UserName = GlobalParams.UserName; UNPCC.Password = GlobalParams.Password; AddClient <GetCarClient>(type, temp); return(temp); } } ; return(null); }
public Form_CarBack(int OrderID) { InitializeComponent(); OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); Order_Temp = OrderSummery_Client.SelectOrderSummery_OrderID(OrderID); TimeSpan TS_Start = new TimeSpan(Order_Temp.Order_Start_Time.Ticks); TimeSpan TS_End = new TimeSpan(Order_Temp.Checkout_Time.Ticks); TimeSpan TS = TS_Start.Subtract(TS_End); decimal RentalPrice; decimal CatchPrice; decimal OverPrice; decimal RentalType; #region 设定4差别项 if (Order_Temp.RentalType_Name == "自驾") { RentalType = 0; OverPrice = Order_Temp.Version_Price_Over; } else { RentalType = Order_Temp.Version_Price_Riding; OverPrice = Order_Temp.Version_Price_Over_Riding; } if (Order_Temp.Client_RoleName == "普通会员") { RentalPrice = Order_Temp.Version_Price_Normal_Rental; if (Order_Temp.Order_IsCatch) { CatchPrice = Order_Temp.Version_Price_Normal_Catch; } else { CatchPrice = 0; } } else { RentalPrice = Order_Temp.Version_Price_Member_Rental; if (Order_Temp.Order_IsCatch) { CatchPrice = Order_Temp.Version_Price_Member_Catch; } else { CatchPrice = 0; } } #endregion //租借车型 Label_Version.Text = Order_Temp.Version_Name; Label_Type.Text = Order_Temp.Type_Name; Label_Brand.Text = Order_Temp.Brand_Name; this.OrderID = OrderID; //基本租金 Label_Count1.Text = Order_Temp.Order_Count.ToString(); Label_Day1.Text = TS.Duration().Days.ToString(); Label_PriceRental.Text = RentalPrice.ToString(); decimal Total_Rental = RentalPrice * TS.Duration().Days *Order_Temp.Order_Count; Label_TotalRental.Text = Total_Rental.ToString(); //接送费用 Label_Count2.Text = Order_Temp.Order_Count.ToString(); Label_PriceCatch.Text = CatchPrice.ToString(); decimal Total_Catch = Order_Temp.Order_Count * CatchPrice; Label_TotalCatch.Text = Total_Catch.ToString(); //行驶费用 Label_BaseKM.Text = Order_Temp.Version_BaseKM.ToString(); Label_OverKM.Text = Order_Temp.Checkout_KM.ToString(); Label_PriceOver.Text = OverPrice.ToString(); decimal Total_Over = Order_Temp.Checkout_KM * OverPrice; Label_TotalOver.Text = Total_Over.ToString(); //代驾费用 Label_Count3.Text = Order_Temp.Order_Count.ToString(); Label_Day2.Text = TS.Duration().Days.ToString(); Label_PriceRiding.Text = RentalType.ToString(); decimal Total_RentalType = Order_Temp.Order_Count * TS.Duration().Days *RentalType; Label_TotalRentalType.Text = Total_RentalType.ToString(); //活动优惠 Label_Count5.Text = Order_Temp.Order_Count.ToString(); Label_ActionPrice.Text = Order_Temp.Action_Price.ToString(); decimal Total_Action = Order_Temp.Order_Count * Order_Temp.Action_Price; Label_TotalAction.Text = Total_Action.ToString(); //押金退还 Label_Count4.Text = Order_Temp.Order_Count.ToString(); Label_PriceDeposit.Text = Order_Temp.Version_Price_Deposit.ToString(); decimal Total_Deposit = Order_Temp.Order_Count * Order_Temp.Version_Price_Deposit; Label_TotalDeposit.Text = Total_Deposit.ToString(); Label_Total.Text = (Total_Rental + Total_Catch + Total_Over + Total_RentalType + Total_Action - Total_Deposit).ToString(); }
public Form_Delete() { InitializeComponent(); OrderSummery_Client = (OrderSummeryClient)ClientFactory.GetClient(ClientType.Type.OrderSummery); GV_OverTime.DataSource = OrderSummery_Client.Select_OverTime(GlobalParams.ShopID).ToList(); }