Exemplo n.º 1
0
 public SubClassificationDetailUI()
 {
     InitializeComponent();
     lId                 = "";
     lOperation          = GlobalVariables.Operation.Add;
     loLookupValue       = new LookUpValueUI();
     loSubClassification = new SubClassification();
 }
Exemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            SubClassification subClassification = db.SubClassifications.Find(id);

            db.SubClassifications.Remove(subClassification);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
 public SubClassificationDetailUI(string[] pRecords)
 {
     InitializeComponent();
     lId                 = "";
     lOperation          = GlobalVariables.Operation.Edit;
     loLookupValue       = new LookUpValueUI();
     loSubClassification = new SubClassification();
     lRecords            = pRecords;
 }
 public LookUpAccountUI()
 {
     InitializeComponent();
     loChartOfAccount    = new ChartOfAccount();
     loMainAccount       = new MainAccount();
     loClassification    = new Classification();
     loSubClassification = new SubClassification();
     lFromSelection      = false;
 }
 public ChartOfAccountDetailUI()
 {
     InitializeComponent();
     lId                 = "";
     lOperation          = GlobalVariables.Operation.Add;
     loLookupValue       = new LookUpValueUI();
     loChartOfAccount    = new ChartOfAccount();
     loMainAccount       = new MainAccount();
     loClassification    = new Classification();
     loSubClassification = new SubClassification();
 }
Exemplo n.º 6
0
        // GET: HpSubClassifications/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SubClassification subClassification = db.SubClassifications.Find(id);

            if (subClassification == null)
            {
                return(HttpNotFound());
            }
            return(View(subClassification));
        }
Exemplo n.º 7
0
        // GET: HpSubClassifications/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SubClassification subClassification = db.SubClassifications.Find(id);

            if (subClassification == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SubCat_Id = new SelectList(db.SubCategories, "SubCat_Id", "SubCatName", subClassification.SubCat_Id);
            return(PartialView(subClassification));
        }
Exemplo n.º 8
0
 public ActionResult Edit([Bind(Include = "SubClassificationId,SubClassificationName,SubCat_Id", Exclude = "SubClassificationImage")] SubClassification subClassification, HttpPostedFileBase SubClassificationImage)
 {
     if (ModelState.IsValid)
     {
         if (SubClassificationImage != null)
         {
             if (SubClassificationImage.ContentLength > 0)
             {
                 byte[] imgBinaryData = new byte[SubClassificationImage.ContentLength];
                 int    readresult    = SubClassificationImage.InputStream.Read(imgBinaryData, 0, SubClassificationImage.ContentLength);
                 subClassification.SubClassificationImage = imgBinaryData;
             }
         }
         db.Entry(subClassification).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SubCat_Id = new SelectList(db.SubCategories, "SubCat_Id", "SubCatName", subClassification.SubCat_Id);
     return(PartialView(subClassification));
 }