public string CapNhatHopDong(string stringGridHopDong) { string madonvi = Request.QueryString["madonvi"]; long idduan = Int64.Parse(Request.QueryString["idduan"]); string excelData = stringGridHopDong; string[] rowSeparator = new string[] { "|*row*|" }; string[] cellSeparator = new string[] { "|*cell*|" }; string[] dataRows = excelData.Split(rowSeparator, StringSplitOptions.None); string a = ""; GiamSatSetting[] subjects = new GiamSatSetting[dataRows.Length]; for (int i = 0; i < dataRows.Length; i++) { string[] dataCells = dataRows[i].Split(cellSeparator, StringSplitOptions.None); string TenHopDong = dataCells[0]; string BenA = dataCells[1]; string BenB = dataCells[2]; string TienNo = dataCells[3]; string TienNgoai = dataCells[4]; string Ttthuchien = dataCells[5]; string Ttgiamsat = dataCells[6]; string Ghichu = dataCells[7]; string GiamSatId = dataCells[8]; string HopDongId = dataCells[9]; string GoiThauId = dataCells[10]; GiamSatSetting gss = new GiamSatSetting(); gss.MaDonVi = madonvi; gss.DuAnID = idduan; gss.HopDongID = Int64.Parse(HopDongId); gss.GiamSatID = Int64.Parse(GiamSatId); gss.GoiThauID = Int64.Parse(GoiThauId); gss.KetQuaGiamSat = EnumHelper.GetEnumValueFromDescription <KetQuaGiamSat>(Ttgiamsat); gss.GhiChu = Ghichu; subjects[i] = gss; } ChangeResultSettings result = giamsatService.GiamSat("", "", "", (int)LoaiGiamSat.GiamSatHopDong, subjects); if (result.ChangeResult == ChangeResult.ThanhCong) { a += "Cập nhật thành công"; } else { a += result.Message; } return(a); }
public string CapNhatKeHoachVon(string stringGridKHV, string Nam) { string madonvi = Request.QueryString["madonvi"]; long idduan = Int64.Parse(Request.QueryString["idduan"]); string excelData = stringGridKHV; string[] rowSeparator = new string[] { "|*row*|" }; string[] cellSeparator = new string[] { "|*cell*|" }; string[] dataRows = excelData.Split(rowSeparator, StringSplitOptions.None); string a = ""; GiamSatSetting[] subjects = new GiamSatSetting[dataRows.Length]; for (int i = 0; i < dataRows.Length; i++) { string[] dataCells = dataRows[i].Split(cellSeparator, StringSplitOptions.None); string TenGiaiDoan = dataCells[0]; string TrangThaiThucHien = dataCells[1]; string TenKetQuaGiamSat = dataCells[2]; string GhiChu = dataCells[3]; string GiamSatId = dataCells[4]; string Dot = dataCells[5]; string SoQuyetDinh = dataCells[6]; string GiaiDoanKHV = dataCells[7]; GiamSatSetting gss = new GiamSatSetting(); gss.MaDonVi = madonvi; gss.DuAnID = idduan; gss.NamKHV = Int32.Parse(Nam); gss.GiaiDoanKHV = (GiaiDoanKHV)Convert.ToInt32(GiaiDoanKHV); gss.KetQuaGiamSat = EnumHelper.GetEnumValueFromDescription <KetQuaGiamSat>(TenKetQuaGiamSat); gss.GhiChu = GhiChu; gss.DotKHV = Convert.ToInt32(Dot); gss.SoQD = SoQuyetDinh == "" ? " " : SoQuyetDinh; gss.GiamSatID = Int64.Parse(GiamSatId); subjects[i] = gss; } ChangeResultSettings result = giamsatService.GiamSat("", "", "", (int)LoaiGiamSat.GiamSatKHV, subjects); if (result.ChangeResult == ChangeResult.ThanhCong) { a += "Cập nhật thành công"; } else { a += result.Message; } LoadKeHoachVon(); return(a); }
public string CapNhatNhaThau(string stringGridNhaThau) { string madonvi = Request.QueryString["madonvi"]; long idduan = Int64.Parse(Request.QueryString["idduan"]); string excelData = stringGridNhaThau; string[] rowSeparator = new string[] { "|*row*|" }; string[] cellSeparator = new string[] { "|*cell*|" }; string[] dataRows = excelData.Split(rowSeparator, StringSplitOptions.None); string a = ""; GiamSatSetting[] subjects = new GiamSatSetting[dataRows.Length]; for (int i = 0; i < dataRows.Length; i++) { string[] dataCells = dataRows[i].Split(cellSeparator, StringSplitOptions.None); string MaDonVi = dataCells[0]; string IdGoiThau = dataCells[1]; string HinhThucDauThau = dataCells[2]; string TenGiaiDoan = dataCells[3]; string TrangThaiThucHien = dataCells[4]; string TenKetQuaGiamSat = dataCells[5]; string GhiChuGiamSat = dataCells[6]; string GiamSatId = dataCells[7]; GiamSatSetting gss = new GiamSatSetting(); gss.MaDonVi = madonvi; gss.DuAnID = idduan; gss.GoiThauID = Int64.Parse(IdGoiThau); gss.GiaiDoanChonNhaThau = EnumHelper.GetEnumValueFromDescription <GiaiDoanChonNhaThau>(TenGiaiDoan); gss.KetQuaGiamSat = EnumHelper.GetEnumValueFromDescription <KetQuaGiamSat>(TenKetQuaGiamSat); gss.GiamSatID = Int64.Parse(GiamSatId); gss.GhiChu = GhiChuGiamSat; subjects[i] = gss; } ChangeResultSettings result = giamsatService.GiamSat("", "", "", (int)LoaiGiamSat.GiamSatChonNhaThau, subjects); if (result.ChangeResult == ChangeResult.ThanhCong) { a += "Cập nhật thành công"; } else { a += result.Message; } LoadGridNhaThau(); return(a); }