public Form_UserSalary() { InitializeComponent(); SalaryInfoSummery_Client = (SalaryInfoSummeryClient)ClientFactory.GetClient(ClientType.Type.SalaryInfoSummery); Salary_Client = (SalaryClient)ClientFactory.GetClient(ClientType.Type.Salary); BindLB(); }
public Form_SalaryAppend() { InitializeComponent(); ShopID = GlobalParams.ShopID; if (ShopID < 0) { MessageBox.Show("您不属于任何店铺,请联系系统管理员分配您的店铺所属!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); this.Close(); } UserSummery_Client = (UserSummeryClient)ClientFactory.GetClient(ClientType.Type.UserSummery); UserManager_Client = (UserManagerClient)ClientFactory.GetClient(ClientType.Type.UserManager); SalaryInfoSummery_Client = (SalaryInfoSummeryClient)ClientFactory.GetClient(ClientType.Type.SalaryInfoSummery); WorkRAP_Client = (WorkRAPClient)ClientFactory.GetClient(ClientType.Type.WorkRAP); SalaryAppend_Client = (SalaryAppendClient)ClientFactory.GetClient(ClientType.Type.SalaryAppend); List_SalaryAppend = SalaryInfoSummery_Client.SelectSalaryAppend().Where(P => P.SalaryAppend_Time.Year == DateTime.Now.Year && P.SalaryAppend_Time.Month == DateTime.Now.Month).ToList(); LB_User.DisplayMember = "UserName"; LB_User.ValueMember = "UserId"; LB_User.DataSource = UserManager_Client.GetAllShops(null, null, ShopID).ToList(); mark = true; BT_Change_Click(null, null); }
public Form_SalaryInfo(Guid UID, String RealName, decimal BaseSalary, decimal TotalSalary) { InitializeComponent(); this.printDocument1.OriginAtMargins = true; //启用页边距 this.pageSetupDialog1.EnableMetric = true; //以毫米为单位 SalaryInfoSummery_Client = (SalaryInfoSummeryClient)ClientFactory.GetClient(ClientType.Type.SalaryInfoSummery); List_RAP = SalaryInfoSummery_Client.SelectRAP_UID(UID).ToList(); List_Append = SalaryInfoSummery_Client.SelectSalaryAppend_UID(UID).ToList(); Row_count = 3 + List_RAP.Count() + List_Append.Count(); PL_Salary.RowCount = Row_count; PL_Salary.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single; for (int h = 0; h < PL_Salary.RowStyles.Count; h++) { PL_Salary.RowStyles[h].SizeType = SizeType.Absolute; PL_Salary.RowStyles[h].Height = 20; } for (int i = 0; i < Row_count; i++) { Label LB1 = new Label(); Label LB2 = new Label(); LB1.Font = label1.Font; LB2.Font = label1.Font; if (i > 1 && i <= List_RAP.Count() + 1) { LB1.Text = List_RAP[i - 2].RAP_Name; LB2.Text = List_RAP[i - 2].RAP_Price.ToString(); } else if (i > 1 + List_RAP.Count() && i <= List_Append.Count() + List_RAP.Count() + 1) { LB1.Text = List_Append[i - 2 - List_RAP.Count].SalaryAppend_Info; LB2.Text = List_Append[i - 2 - List_RAP.Count].SalaryAppend_Price.ToString(); } else if (i == 0) { LB1.Text = "员工姓名"; LB2.Text = RealName; } else if (i == 1) { LB1.Text = "基本工资"; LB2.Text = BaseSalary.ToString(); } else { LB1.Text = "合计"; LB2.Text = TotalSalary.ToString(); } PL_Salary.Controls.Add(LB1, 0, i); PL_Salary.Controls.Add(LB2, 1, i); } this.Height = 20 * (Row_count + 3) + 30; }
public Form_Salary() { InitializeComponent(); if (ShopID < 0) { MessageBox.Show("您不属于任何店铺,请联系系统管理员分配您的店铺所属!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); this.Close(); } year = 2012; month = 1; SalaryInfoSummery_Client = (SalaryInfoSummeryClient)ClientFactory.GetClient(ClientType.Type.SalaryInfoSummery); SalaryLog_Client = (SalaryLogClient)ClientFactory.GetClient(ClientType.Type.SalaryLog); List_SalaryInfo = SalaryInfoSummery_Client.SelectSalaryInfo(ShopID, null, null, null, null, null).ToList(); dataGridView1.DataSource = List_SalaryInfo; Bind_Year(); }
/// <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); }