Beispiel #1
0
            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("");
                }
            }
Beispiel #2
0
        // GET: BACLUONGs/Create
        public ActionResult Create()
        {
            BACLUONG obj = new BACLUONG();

            obj.BL_MA = CreateID.CreateID_ByteText();
            return(View(obj));
        }
Beispiel #3
0
        public ActionResult DeleteConfirmed(string id)
        {
            BACLUONG bACLUONG = db.BACLUONGs.Find(id);

            db.BACLUONGs.Remove(bACLUONG);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #4
0
 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));
 }
Beispiel #5
0
        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));
        }
Beispiel #6
0
        // 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));
        }
Beispiel #7
0
            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("");
                }
            }