public ActionResult Kaoqin() { List <Kaoqin_Jiaban> ltjiaban = new List <Kaoqin_Jiaban>(); Kaoqin_Jiaban kaoqin_Jiaban = new Kaoqin_Jiaban(); ltjiaban.Add(kaoqin_Jiaban); ViewData["jiaban"] = ltjiaban; List <Kaoqin_Qingjia> ltqingjia = new List <Kaoqin_Qingjia>(); Kaoqin_Qingjia kaoqin_Qingjia = new Kaoqin_Qingjia(); ltqingjia.Add(kaoqin_Qingjia); ViewData["qingjia"] = ltqingjia; List <Kaoqin_Yichang> ltyichang = new List <Kaoqin_Yichang>(); Kaoqin_Yichang kaoqin_Yichang = new Kaoqin_Yichang(); ltyichang.Add(kaoqin_Yichang); ViewData["yichang"] = ltyichang; Message message = new Message(); message.Msg_cd = "Y"; return(View(message)); }
public ActionResult Qrkq() { string id = Request.QueryString["id"]; List <Kaoqin_Jiaban> ltjiaban = new List <Kaoqin_Jiaban>(); Kaoqin_Jiaban kaoqin_Jiaban = new Kaoqin_Jiaban(); ltjiaban.Add(kaoqin_Jiaban); ViewData["jiaban"] = ltjiaban; List <Kaoqin_Qingjia> ltqingjia = new List <Kaoqin_Qingjia>(); Kaoqin_Qingjia kaoqin_Qingjia = new Kaoqin_Qingjia(); ltqingjia.Add(kaoqin_Qingjia); ViewData["qingjia"] = ltqingjia; List <Kaoqin_Yichang> ltyichang = new List <Kaoqin_Yichang>(); Kaoqin_Yichang kaoqin_Yichang = new Kaoqin_Yichang(); ltyichang.Add(kaoqin_Yichang); ViewData["yichang"] = ltyichang; return(View()); }
public ActionResult Qrkq(FormCollection collection) { string emp_no = Request.QueryString["id"]; RenshiServiceSoapClient renshiService = new RenshiServiceSoapClient(); DataTable dt = renshiService.SearchMonth("queren", ""); string month = dt.Rows[0]["msg_text"].ToString(); dt = null; dt = renshiService.Qrkq("post", emp_no, month); Message message = new Message(); message.Msg_cd = dt.Rows[0]["msg_cd"].ToString(); message.Msg_text = dt.Rows[0]["msg_text"].ToString(); DataSet ds = renshiService.SearchKaoqin(emp_no, month); //加班项目 if (ds.Tables[0].Rows.Count > 0) { List <Kaoqin_Jiaban> ltjiaban = new List <Kaoqin_Jiaban>(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Kaoqin_Jiaban kaoqin_Jiaban = new Kaoqin_Jiaban(); kaoqin_Jiaban.Rt_date = ds.Tables[0].Rows[i]["rt_date"].ToString(); kaoqin_Jiaban.Wd_day = ds.Tables[0].Rows[i]["wd_day"].ToString(); kaoqin_Jiaban.Dilig_nm = ds.Tables[0].Rows[i]["dilig_nm"].ToString(); kaoqin_Jiaban.Fq_name = ds.Tables[0].Rows[i]["fq_name"].ToString(); kaoqin_Jiaban.Rt_btime = ds.Tables[0].Rows[i]["rt_btime"].ToString(); kaoqin_Jiaban.Rt_etime = ds.Tables[0].Rows[i]["rt_etime"].ToString(); kaoqin_Jiaban.Rt_hh = Convert.ToDecimal(ds.Tables[0].Rows[i]["rt_hh"].ToString()); ltjiaban.Add(kaoqin_Jiaban); ViewData["jiaban"] = ltjiaban; } } else { List <Kaoqin_Jiaban> ltjiaban = new List <Kaoqin_Jiaban>(); Kaoqin_Jiaban kaoqin_Jiaban = new Kaoqin_Jiaban(); ltjiaban.Add(kaoqin_Jiaban); ViewData["jiaban"] = ltjiaban; } //请假项目 if (ds.Tables[1].Rows.Count > 0) { List <Kaoqin_Qingjia> ltqingjia = new List <Kaoqin_Qingjia>(); for (int i = 0; i < ds.Tables[1].Rows.Count; i++) { Kaoqin_Qingjia kaoqin_Qingjia = new Kaoqin_Qingjia(); kaoqin_Qingjia.Ex_date = ds.Tables[1].Rows[i]["ex_date"].ToString(); kaoqin_Qingjia.Wd_day = ds.Tables[1].Rows[i]["wd_day"].ToString(); kaoqin_Qingjia.Dilig_nm = ds.Tables[1].Rows[i]["dilig_nm"].ToString(); kaoqin_Qingjia.Fq_name = ds.Tables[1].Rows[i]["fq_name"].ToString(); kaoqin_Qingjia.Ex_btime = ds.Tables[1].Rows[i]["ex_btime"].ToString(); kaoqin_Qingjia.Ex_etime = ds.Tables[1].Rows[i]["ex_etime"].ToString(); kaoqin_Qingjia.Ex_hh = Convert.ToDecimal(ds.Tables[1].Rows[i]["ex_hh"].ToString()); ltqingjia.Add(kaoqin_Qingjia); ViewData["qingjia"] = ltqingjia; } } else { List <Kaoqin_Qingjia> ltqingjia = new List <Kaoqin_Qingjia>(); Kaoqin_Qingjia kaoqin_Qingjia = new Kaoqin_Qingjia(); ltqingjia.Add(kaoqin_Qingjia); ViewData["qingjia"] = ltqingjia; } //异常出勤 if (ds.Tables[2].Rows.Count > 0) { List <Kaoqin_Yichang> ltyichang = new List <Kaoqin_Yichang>(); for (int i = 0; i < ds.Tables[2].Rows.Count; i++) { Kaoqin_Yichang kaoqin_Yichang = new Kaoqin_Yichang(); kaoqin_Yichang.Rt_date = ds.Tables[2].Rows[i]["rt_date"].ToString(); kaoqin_Yichang.Wd_day = ds.Tables[2].Rows[i]["wd_day"].ToString(); kaoqin_Yichang.Dilig_nm = ds.Tables[2].Rows[i]["dilig_nm"].ToString(); kaoqin_Yichang.Fq_name = ds.Tables[2].Rows[i]["fq_name"].ToString(); kaoqin_Yichang.Rt_btime = ds.Tables[2].Rows[i]["rt_btime"].ToString(); kaoqin_Yichang.Rt_etime = ds.Tables[2].Rows[i]["rt_etime"].ToString(); kaoqin_Yichang.Rt_hh = Convert.ToDecimal(ds.Tables[2].Rows[i]["rt_hh"].ToString()); ltyichang.Add(kaoqin_Yichang); ViewData["yichang"] = ltyichang; } } else { List <Kaoqin_Yichang> ltyichang = new List <Kaoqin_Yichang>(); Kaoqin_Yichang kaoqin_Yichang = new Kaoqin_Yichang(); ltyichang.Add(kaoqin_Yichang); ViewData["yichang"] = ltyichang; } return(View(message)); }
public ActionResult Qrkq(FormCollection collection) { string month = collection["combox_year"]; month = month + collection["combox_month"]; string emp_no = Request.QueryString["id"]; RenshiService.renshiSoapClient renshiService = new RenshiService.renshiSoapClient(); DataSet ds = renshiService.GetHRT010TB(emp_no, month); //加班项目 if (ds.Tables[0].Rows.Count > 0) { List <Kaoqin_Jiaban> ltjiaban = new List <Kaoqin_Jiaban>(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Kaoqin_Jiaban kaoqin_Jiaban = new Kaoqin_Jiaban(); kaoqin_Jiaban.Rt_date = ds.Tables[0].Rows[i]["rt_date"].ToString(); kaoqin_Jiaban.Wd_day = ds.Tables[0].Rows[i]["wd_day"].ToString(); kaoqin_Jiaban.Dilig_nm = ds.Tables[0].Rows[i]["dilig_nm"].ToString(); kaoqin_Jiaban.Fq_name = ds.Tables[0].Rows[i]["fq_name"].ToString(); kaoqin_Jiaban.Rt_btime = ds.Tables[0].Rows[i]["rt_btime"].ToString(); kaoqin_Jiaban.Rt_etime = ds.Tables[0].Rows[i]["rt_etime"].ToString(); kaoqin_Jiaban.Rt_hh = Convert.ToDecimal(ds.Tables[0].Rows[i]["rt_hh"].ToString()); ltjiaban.Add(kaoqin_Jiaban); ViewData["jiaban"] = ltjiaban; } } else { List <Kaoqin_Jiaban> ltjiaban = new List <Kaoqin_Jiaban>(); Kaoqin_Jiaban kaoqin_Jiaban = new Kaoqin_Jiaban(); ltjiaban.Add(kaoqin_Jiaban); ViewData["jiaban"] = ltjiaban; } //请假项目 if (ds.Tables[1].Rows.Count > 0) { List <Kaoqin_Qingjia> ltqingjia = new List <Kaoqin_Qingjia>(); for (int i = 0; i < ds.Tables[1].Rows.Count; i++) { Kaoqin_Qingjia kaoqin_Qingjia = new Kaoqin_Qingjia(); kaoqin_Qingjia.Ex_date = ds.Tables[1].Rows[i]["ex_date"].ToString(); kaoqin_Qingjia.Wd_day = ds.Tables[1].Rows[i]["wd_day"].ToString(); kaoqin_Qingjia.Dilig_nm = ds.Tables[1].Rows[i]["dilig_nm"].ToString(); kaoqin_Qingjia.Fq_name = ds.Tables[1].Rows[i]["fq_name"].ToString(); kaoqin_Qingjia.Ex_btime = ds.Tables[1].Rows[i]["ex_btime"].ToString(); kaoqin_Qingjia.Ex_etime = ds.Tables[1].Rows[i]["ex_etime"].ToString(); kaoqin_Qingjia.Ex_hh = Convert.ToDecimal(ds.Tables[1].Rows[i]["ex_hh"].ToString()); ltqingjia.Add(kaoqin_Qingjia); ViewData["qingjia"] = ltqingjia; } } else { List <Kaoqin_Qingjia> ltqingjia = new List <Kaoqin_Qingjia>(); Kaoqin_Qingjia kaoqin_Qingjia = new Kaoqin_Qingjia(); ltqingjia.Add(kaoqin_Qingjia); ViewData["qingjia"] = ltqingjia; } //异常出勤 if (ds.Tables[2].Rows.Count > 0) { List <Kaoqin_Yichang> ltyichang = new List <Kaoqin_Yichang>(); for (int i = 0; i < ds.Tables[2].Rows.Count; i++) { Kaoqin_Yichang kaoqin_Yichang = new Kaoqin_Yichang(); kaoqin_Yichang.Rt_date = ds.Tables[2].Rows[i]["rt_date"].ToString(); kaoqin_Yichang.Wd_day = ds.Tables[2].Rows[i]["wd_day"].ToString(); kaoqin_Yichang.Dilig_nm = ds.Tables[2].Rows[i]["dilig_nm"].ToString(); kaoqin_Yichang.Fq_name = ds.Tables[2].Rows[i]["fq_name"].ToString(); kaoqin_Yichang.Rt_btime = ds.Tables[2].Rows[i]["rt_btime"].ToString(); kaoqin_Yichang.Rt_etime = ds.Tables[2].Rows[i]["rt_etime"].ToString(); kaoqin_Yichang.Rt_hh = Convert.ToDecimal(ds.Tables[2].Rows[i]["rt_hh"].ToString()); ltyichang.Add(kaoqin_Yichang); ViewData["yichang"] = ltyichang; } } else { List <Kaoqin_Yichang> ltyichang = new List <Kaoqin_Yichang>(); Kaoqin_Yichang kaoqin_Yichang = new Kaoqin_Yichang(); ltyichang.Add(kaoqin_Yichang); ViewData["yichang"] = ltyichang; } return(View()); }