Example #1
0
        public ActionResult Fh(int id)
        {
            List <salary_grantModel>            sj   = MyProperty.SelectById(id);
            List <salary_grant_detailsModel>    list = MyProperty2.SelectById(sj[0].salary_grant_id);
            List <salary_standard_detailsModel> kk   = MyProperty4.BJSelectBy2(list[0].salary_standard_id.ToString());
            int j = 0;

            foreach (salary_grant_detailsModel item in list)
            {
                for (int i = 0; i < kk.Count; i++)
                {
                    if (kk[i].item_name == "基本工资")
                    {
                        item.jb = kk[i].salary;
                    }
                    if (kk[i].item_name == "岗位工资")
                    {
                        item.gw = kk[i].salary;
                    }
                    if (kk[i].item_name == "交通补助")
                    {
                        item.jt = kk[i].salary;
                    }
                    if (kk[i].item_name == "午餐补助")
                    {
                        item.wc = kk[i].salary;
                    }
                    if (kk[i].item_name == "五险一金")
                    {
                        item.wx = kk[i].salary;
                    }
                }
                item.jl   = list[j].bouns_sum;
                item.jx   = list[j].sale_sum;
                item.yk   = list[j].deduct_sum;
                item.sf   = list[j].salary_paid_sum;
                item.zq   = list[j].salary_standard_sum;
                item.grid = list[j].grd_id;
                item.sgrd = sj[0].sgr_id;
                j++;
            }

            ViewData["list"] = list;
            ViewData["xcbh"] = id;
            ViewData["jgrs"] = sj[0].human_amount;
            ViewData["jbze"] = sj[0].salary_standard_sum;
            ViewData["sfze"] = sj[0].salary_paid_sum;
            return(View());
        }