public string newStt(string maviettat) { maviettat = maviettat ?? ""; var newsott = generateId.NextId(lastStt(maviettat), "", "000001") + maviettat + System.DateTime.Now.Year.ToString(); return(newsott); }
public string newSgtcode(DateTime batdau, string chinhanh, string macode) { switch (chinhanh) { case "STS": chinhanh = "SGT"; break; default: break; } var newCode = generateId.NextId(lastCode(batdau, chinhanh, macode), chinhanh + macode + "-" + batdau.Year.ToString() + "-", "00001"); return(newCode); }
public string newMatp(string matinh) { GenerateId newId = new GenerateId(); return(newId.NextId(lastCode(matinh), matinh, "001")); }
public string nextSupplierCode() { GenerateId newId = new GenerateId(); return(newId.NextId(lastSupplierCode(), "", "00001")); }
//public List<DataFromTourViewModel> listDataFromTour(string tour, string tungay, string denngay, string tuyentq, string chinhanh) //{ // var parameter = new SqlParameter[] // { // new SqlParameter("@tour",tour), // new SqlParameter("@tungay",tungay), // new SqlParameter("@denngay",denngay), // new SqlParameter("@tuyentq",tuyentq), // new SqlParameter("@chinhanh",chinhanh) // }; // var d = _context.DataFromTourViewModels.FromSql("spLayDataVetour_ @tour,@tungay,@denngay,@tuyentq,@chinhanh", parameter).ToList(); // return d; //} //public DataTuVetour GetvetourBySerial(string serial, string chinhanh) //{ // var parameter = new SqlParameter[] // { // new SqlParameter("@serial",serial), // new SqlParameter("@chinhanh",chinhanh) // }; // try // { // var d = _context.DataTuVetour.FromSql("spTimvetourByserial @serial ,@chinhanh", parameter).SingleOrDefault(); // return d; // } // catch { return null; } //} public string newhdvat(string kyhieu) { var newhd = generateId.NextId(lastHdvat(kyhieu), "", "0000001"); return(newhd); }
//public IPagedList<Company> ListCompany(string searchString, int? page) //{ // if (page.HasValue && page < 1) // return null; // var parammeter = new SqlParameter[] // { // new SqlParameter("@searchString",searchString) // }; // var list = _context.Company.FromSql("exec spListCompany @searchString", parammeter).ToList(); // const int pageSize = 10; // var listPaged = list.ToPagedList(page ?? 1, pageSize); // if (listPaged.PageNumber != 1 && page.HasValue && page > listPaged.PageCount) // return null; // return listPaged; //} public string nextCompanyCode() { GenerateId newId = new GenerateId(); return(newId.NextId(lastCompanyCode(), "", "00001")); }
public string newId() { var newId = generateId.NextId(lastId(), "", "000001") + System.DateTime.Now.Year.ToString(); return(newId); }
public string newTourTempId() { GenerateId newId = new GenerateId(); return(newId.NextId(lastSerial(), "", "00001")); }