public string ToString(enumStruct e) { switch (e) { case enumStruct.MANV: return(MANV.ToString()); case enumStruct.MAPB: return(MAPB.ToString()); case enumStruct.TENNV: return(TENNV.ToString()); case enumStruct.NGAYSINH: return(DateTime.Parse(NGAYSINH.ToString()).ToShortDateString()); case enumStruct.GIOITINH: return(GIOITINH.ToString()); case enumStruct.MA_NGS: return(MA_NGS.ToString()); case enumStruct.BACLUONG: return(BACLUONG.ToString()); case enumStruct.DIACHI: return(DIACHI.ToString()); case enumStruct.ACCOUNT: return(ACCOUNT.ToString()); default: return(""); } }
// GET: BACLUONGs/Create public ActionResult Create() { BACLUONG obj = new BACLUONG(); obj.BL_MA = CreateID.CreateID_ByteText(); return(View(obj)); }
public ActionResult DeleteConfirmed(string id) { BACLUONG bACLUONG = db.BACLUONGs.Find(id); db.BACLUONGs.Remove(bACLUONG); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "BL_MA,BL_TEN")] BACLUONG bACLUONG) { if (ModelState.IsValid) { db.Entry(bACLUONG).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bACLUONG)); }
public ActionResult Create([Bind(Include = "BL_MA,BL_TEN")] BACLUONG bACLUONG) { if (ModelState.IsValid) { db.BACLUONGs.Add(bACLUONG); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bACLUONG)); }
// GET: BACLUONGs/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BACLUONG bACLUONG = db.BACLUONGs.Find(id); if (bACLUONG == null) { return(HttpNotFound()); } return(View(bACLUONG)); }
public string ToString(enumStruct e) { switch (e) { case enumStruct.BACLUONG: return(BACLUONG.ToString()); case enumStruct.LUONGCOBAN: return(LUONGCOBAN.ToString()); case enumStruct.HESOLUONG: return(HESOLUONG.ToString()); case enumStruct.HESOPHUCAP: return(HESOPHUCAP.ToString()); default: return(""); } }