public IActionResult viewProduct(string id)
        {
            productModel pd = new productModel();

            pd.select_product("pd_id = '" + id + "'");

            ViewData["pd_id"]     = id;
            ViewData["pd_img"]    = pd.pd_img;
            ViewData["pd_code"]   = pd.pd_code;
            ViewData["pd_name"]   = pd.pd_name;
            ViewData["pd_color"]  = pd.pd_color;
            ViewData["pd_width"]  = pd.pd_width;
            ViewData["pd_long"]   = pd.pd_long;
            ViewData["pd_detail"] = pd.pd_detail;
            ViewData["pd_price"]  = pd.pd_price;
            ViewData["pd_sale"]   = pd.pd_sale;

            groupPoductModel gp = new groupPoductModel();

            ViewData["gp"]   = gp.drop_gp(pd.pd_ref_group_product);
            ViewData["gp_2"] = gp.drop_gp(pd.pd_ref_group_product_sale);

            unitModel un = new unitModel();

            ViewData["unit"] = un.drop_unit(pd.pd_unit);

            return(View());
        }
Example #2
0
        public void del_unit(string id)
        {
            unitModel ut = new unitModel();

            ut.unit_id = id;
            ut.del_unit();
        }
Example #3
0
        public IActionResult unit()
        {
            unitModel ut = new unitModel();

            ViewData["unit"] = ut.list_unit();

            return(View());
        }
Example #4
0
        public string select_unit(string id)
        {
            unitModel ut = new unitModel();

            ut.select_unit("unit_id = '" + id + "'");

            return(ut.unit_name);
        }
Example #5
0
        public IActionResult insert_unit(string unit)
        {
            unitModel ut = new unitModel();

            ut.unit_name = unit;
            ut.insert_unit();

            return(RedirectToAction("unit", "Information"));
        }
Example #6
0
        public IActionResult update_unit(string unit_edit, string unit_id)
        {
            unitModel ut = new unitModel();

            ut.unit_name = unit_edit;
            ut.unit_id   = unit_id;

            ut.update_unit();

            return(RedirectToAction("unit", "Information"));
        }
        public IActionResult addProduct()
        {
            groupPoductModel gp = new groupPoductModel();

            ViewData["gp"] = gp.drop_gp("");

            unitModel un = new unitModel();

            ViewData["unit"] = un.drop_unit("");

            return(View());
        }
        public IActionResult addFormula()
        {
            groupPoductModel gp = new groupPoductModel();

            ViewData["group_product"] = gp.drop_gp("");


            groupMaterialModel gm = new groupMaterialModel();

            ViewData["group_material"] = gm.drop_gm("");

            unitModel ut = new unitModel();

            ViewData["unit"] = ut.drop_unit("");

            return(View());
        }
Example #9
0
        public IActionResult groupMaterial()
        {
            groupMaterialModel gm = new groupMaterialModel();

            ViewData["gm"] = gm.list_gm();
            gm.create_code();
            ViewData["gm_code"] = gm.gm_code;

            typeMaterialModel tm = new typeMaterialModel();

            ViewData["tm"] = tm.drop_type_material("");

            unitModel ut = new unitModel();

            ViewData["unit"] = ut.drop_unit("");


            return(View());
        }
Example #10
0
        public IActionResult viewMaterial(string id)
        {
            ViewData["mtr_id"] = id;

            MaterialModel mt = new MaterialModel();

            mt.select_mtr("mtr_id = '" + id + "'");
            ViewData["mtr_img"]      = mt.mtr_img;
            ViewData["mtr_code"]     = mt.mtr_code;
            ViewData["mtr_name"]     = mt.mtr_name;
            ViewData["mtr_detail"]   = mt.mtr_detail;
            ViewData["mtr_keep_num"] = mt.mtr_keep_num;
            ViewData["mtr_width"]    = mt.mtr_width;
            ViewData["mtr_long"]     = mt.mtr_long;
            ViewData["mtr_side"]     = mt.mtr_side;
            ViewData["mtr_roll"]     = mt.mtr_roll;
            ViewData["mtr_noti"]     = mt.mtr_noti;
            ViewData["mtr_noti_min"] = mt.mtr_noti_min;
            ViewData["mtr_noti_max"] = mt.mtr_noti_max;



            groupMaterialModel gm = new groupMaterialModel();

            ViewData["group_material"] = gm.drop_gm(mt.mtr_ref_tm_id);

            unitModel un = new unitModel();

            ViewData["unit_get"]    = un.drop_unit(mt.mtr_unit_get);
            ViewData["unit_expose"] = un.drop_unit(mt.mtr_unit_expose);


            stickerModel stk = new stickerModel();

            ViewData["sticker"] = stk.drop_con_pay(mt.mtr_sticker);

            shelfModel sh = new shelfModel();

            ViewData["shelf"] = sh.drop_shelf(mt.mtr_shelf);

            return(View());
        }
Example #11
0
        public IActionResult addMaterial()
        {
            groupMaterialModel gm = new groupMaterialModel();

            ViewData["group_material"] = gm.drop_gm("");

            unitModel un = new unitModel();

            ViewData["unit"] = un.drop_unit("");


            stickerModel stk = new stickerModel();

            ViewData["sticker"] = stk.drop_con_pay("");

            shelfModel sh = new shelfModel();

            ViewData["shelf"] = sh.drop_shelf("");

            return(View());
        }
Example #12
0
        public IActionResult editFormula(string id)
        {
            FormulaModel fm = new FormulaModel();

            fm.select_formula("fm_id = '" + id + "'");

            groupPoductModel gp = new groupPoductModel();

            ViewData["group_product"] = gp.drop_gp(fm.fm_ref_group_product_id);

            groupMaterialModel gm = new groupMaterialModel();

            ViewData["group_material"] = gm.drop_gm(fm.fm_ref_group_material_id);

            unitModel ut = new unitModel();

            ViewData["unit"] = ut.drop_unit(fm.fm_ref_unit_id);

            ViewData["fm_id"] = id;

            checkVal ck = new checkVal();

            ViewData["result_width"]       = ck.turnTF(fm.fm_result_width);
            ViewData["result_long"]        = ck.turnTF(fm.fm_result_long);
            ViewData["width_action_a"]     = ck.ckFormula(fm.fm_width_action_a);
            ViewData["width_action_a_val"] = fm.fm_width_action_a_val;
            ViewData["width_action_b"]     = ck.ckFormula(fm.fm_width_action_b);
            ViewData["width_action_b_val"] = fm.fm_width_action_b_val;
            ViewData["long_action_a"]      = ck.ckFormula(fm.fm_long_action_a);
            ViewData["long_action_a_val"]  = fm.fm_long_action_a_val;
            ViewData["long_action_b"]      = ck.ckFormula(fm.fm_long_action_b);
            ViewData["long_action_b_val"]  = fm.fm_long_action_b_val;
            ViewData["result_num"]         = ck.turnTF(fm.fm_result_num);
            ViewData["width_x_long"]       = fm.fm_width_x_long;
            ViewData["use_num"]            = fm.fm_use_num;


            return(View());
        }