public bool UpdateData(string Id, string MaChamCong, string MaCa, bool InOutMode, DateTime ngayThang) { DataController.DataHandler hdl = DataController.DataHandler.GetInstance();; try { hdl.ExecuteNonQuery("api_PushMarkPointData", "@Id", "@MaChamCong", "@MaCa", "@DiVao", "@Time", "@NgayChamCong", "@Order", Id, MaChamCong, MaCa, InOutMode, ngayThang.ToString("HH:mm:ss"), ngayThang, 1); return(true); } catch (Exception ex) { ex.Data.Add(hdl, hdl); return(false); } }
public void BinData(ReportFilter rp) { //string a = xrLabel5.Text.Replace("{1}","d"); DataTable dt = new DataController.DataHandler().ExecuteDataTable("sp_MauInCheDo", "@IDChiTietCheDoBaoHiem", rp.WhereClause); if (!string.IsNullOrEmpty(dt.Rows[0]["SoDienThoai"].ToString())) { // xrt_sdt.Text = "Số điện thoại (nếu có): " + dt.Rows[0]["SoDienThoai"].ToString(); xrt_hoten.Text = xrt_hoten.Text.Replace("{9}", dt.Rows[0]["SoDienThoai"].ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{9}", "..................................................................................."); } if (!string.IsNullOrEmpty(dt.Rows[0]["HoTen"].ToString())) { // xrt_hoten.Text = "Họ và tên: " + dt.Rows[0]["HoTen"].ToString(); xrt_hoten.Text = xrt_hoten.Text.Replace("{1}", dt.Rows[0]["HoTen"].ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{1}", " ................................................"); } if (!string.IsNullOrEmpty(dt.Rows[0]["SoSoBHXH"].ToString())) { // xrt_sosobhxh.Text = "Số sổ BHXH: " + dt.Rows[0]["SoSoBHXH"].ToString(); xrt_hoten.Text = xrt_hoten.Text.Replace("{2}", dt.Rows[0]["SoSoBHXH"].ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{2}", "..........................,"); } if (!string.IsNullOrEmpty(dt.Rows[0]["SoCMTND"].ToString())) { //xrt_cmnd.Text = "Số CMND "+dt.Rows[0]["SoCMTND"].ToString(); xrt_hoten.Text = xrt_hoten.Text.Replace("{3}", dt.Rows[0]["SoCMTND"].ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{3}", "..................................."); } if (!string.IsNullOrEmpty(dt.Rows[0]["NoiCapCMND"].ToString())) { //xrt_noicap.Text = "do " + dt.Rows[0]["NoiCapCMND"].ToString(); xrt_hoten.Text = xrt_hoten.Text.Replace("{4}", dt.Rows[0]["NoiCapCMND"].ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{4}", "..................."); } if (!string.IsNullOrEmpty(dt.Rows[0]["DiaChiLienHe"].ToString())) { // xrt_diachilienhe.Text="Hiện tại cư trú tại: "+dt.Rows[0]["DiaChiLienHe"].ToString(); xrt_hoten.Text = xrt_hoten.Text.Replace("{8}", dt.Rows[0]["NoiCapCMND"].ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{8}", ".........................................................................................."); } if (!string.IsNullOrEmpty(dt.Rows[0]["NgayCapCMTND"].ToString())) { xrt_hoten.Text = xrt_hoten.Text.Replace("{5}", Convert.ToDateTime(dt.Rows[0]["NgayCapCMTND"]).Day.ToString()); xrt_hoten.Text = xrt_hoten.Text.Replace("{6}", Convert.ToDateTime(dt.Rows[0]["NgayCapCMTND"]).Month.ToString()); xrt_hoten.Text = xrt_hoten.Text.Replace("{7}", Convert.ToDateTime(dt.Rows[0]["NgayCapCMTND"]).Year.ToString()); // xrt_capngay.Text = Convert.ToDateTime(dt.Rows[0]["NgayCapCMTND"]).Day + " tháng " + Convert.ToDateTime(dt.Rows[0]["NgayCapCMTND"]).Month + " năm " + Convert.ToDateTime(dt.Rows[0]["NgayCapCMTND"]).Year; } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{5}", "..."); xrt_hoten.Text = xrt_hoten.Text.Replace("{6}", "..."); xrt_hoten.Text = xrt_hoten.Text.Replace("{7}", "...."); } if (!string.IsNullOrEmpty(dt.Rows[0]["NgayBatDau"].ToString())) { xrt_hoten.Text = xrt_hoten.Text.Replace("{12}", Convert.ToDateTime(dt.Rows[0]["NgayBatDau"]).Month.ToString()); xrt_hoten.Text = xrt_hoten.Text.Replace("{13}", Convert.ToDateTime(dt.Rows[0]["NgayBatDau"]).Year.ToString()); // xrt_ngaybatdau.Text = "Nghỉ việc, không đóng BHXH từ tháng " + Convert.ToDateTime(dt.Rows[0]["NgayBatDau"]).Month + " năm " + Convert.ToDateTime(dt.Rows[0]["NgayBatDau"]).Year; } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{12}", " ... "); xrt_hoten.Text = xrt_hoten.Text.Replace("{13}", " ...."); } if (!string.IsNullOrEmpty(dt.Rows[0]["NgayKetThuc"].ToString())) { xrt_hoten.Text = xrt_hoten.Text.Replace("{14}", Convert.ToDateTime(dt.Rows[0]["NgayKetThuc"]).Day.ToString()); xrt_hoten.Text = xrt_hoten.Text.Replace("{15}", Convert.ToDateTime(dt.Rows[0]["NgayKetThuc"]).Month.ToString()); xrt_hoten.Text = xrt_hoten.Text.Replace("{16}", Convert.ToDateTime(dt.Rows[0]["NgayKetThuc"]).Year.ToString()); //xrt_ngayketthuc.Text = "Sinh con/Nhận nuôi con ngày " + Convert.ToDateTime(dt.Rows[0]["NgayKetThuc"]).Day + " tháng " + Convert.ToDateTime(dt.Rows[0]["NgayBatDau"]).Month + " năm " + Convert.ToDateTime(dt.Rows[0]["NgayKetThuc"]).Year; } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{14}", " ... "); xrt_hoten.Text = xrt_hoten.Text.Replace("{15}", " ... "); xrt_hoten.Text = xrt_hoten.Text.Replace("{16}", " .... "); } if (!string.IsNullOrEmpty(dt.Rows[0]["ThoiGianDongBaoHiem"].ToString())) { int nam = 0; int thang = 0; if (Convert.ToInt32(dt.Rows[0]["ThoiGianDongBaoHiem"]) > 12) { nam = nam + Convert.ToInt32(dt.Rows[0]["ThoiGianDongBaoHiem"]) / 12; thang = thang + Convert.ToInt32(dt.Rows[0]["ThoiGianDongBaoHiem"]) % 12; } else { thang = Convert.ToInt32(dt.Rows[0]["ThoiGianDongBaoHiem"]); } xrt_hoten.Text = xrt_hoten.Text.Replace("{10}", nam.ToString()); xrt_hoten.Text = xrt_hoten.Text.Replace("{11}", thang.ToString()); } else { xrt_hoten.Text = xrt_hoten.Text.Replace("{10}", "..."); xrt_hoten.Text = xrt_hoten.Text.Replace("{11}", "...."); } xrt_ngay1.Text = ".........., " + "ngày " + DateTime.Now.Day + " tháng " + DateTime.Now.Month + " năm " + DateTime.Now.Year; xrt_ngay2.Text = ".........., " + "ngày " + DateTime.Now.Day + " tháng " + DateTime.Now.Month + " năm " + DateTime.Now.Year; }