Esempio n. 1
0
        public IActionResult addCustomer()
        {
            customerTypeModel ct = new customerTypeModel();

            ViewData["cus_type"] = ct.drop_cus_type_code();

            prefixModel px = new prefixModel();

            ViewData["prefix"] = px.drop_prefix("");

            provinceModel pv = new provinceModel();
            ampuresModel  am = new ampuresModel();
            districts     dt = new districts();

            ViewData["province"] = pv.drop_province("");
            ViewData["amphur"]   = am.dorp_amphur("");
            ViewData["district"] = dt.drop_district("");

            conditionPayModel cd = new conditionPayModel();

            ViewData["condition"] = cd.drop_con_pay("");


            lineModel ln = new lineModel();

            ViewData["line"] = ln.drop_line("");

            line_saleModel ls = new line_saleModel();

            ViewData["line_sale"] = ls.drop_line_sale("");

            return(View());
        }
        public void del_con_pay(string id)
        {
            conditionPayModel cp = new conditionPayModel();

            cp.cdt_id = id;
            cp.del_con_pay();
        }
        public string select_con_type(string id)
        {
            conditionPayModel cp = new conditionPayModel();

            cp.select_con_pay("cdt_id = '" + id + "'");

            return(cp.cdt_name + "^" + cp.cdt_ref_typ_pay + "^" + cp.cdt_num + "^" + cp.cdt_type);
        }
Esempio n. 4
0
        public IActionResult payment()
        {
            typePaymentModel tp = new typePaymentModel();

            ViewData["type_payment"] = tp.drop_type_payment("");

            conditionPayModel cp = new conditionPayModel();

            ViewData["conditionPay"] = cp.list_con_pay();

            return(View());
        }
        public IActionResult update_con_pay(string con_name_edit, string con_pay_edit, string con_num_edit, string con_type_edit, string con_id)
        {
            conditionPayModel cp = new conditionPayModel();

            cp.cdt_name        = con_name_edit;
            cp.cdt_ref_typ_pay = con_pay_edit;
            cp.cdt_num         = con_num_edit;
            cp.cdt_type        = con_type_edit;
            cp.cdt_id          = con_id;
            cp.update_con_pay();

            return(RedirectToAction("payment", "Information"));
        }
        public IActionResult insert_con_pay(string con_name, string con_pay, string con_num, string con_type)
        {
            conditionPayModel cp = new conditionPayModel();

            cp.cdt_name        = con_name;
            cp.cdt_ref_typ_pay = con_pay;
            cp.cdt_num         = con_num;
            cp.cdt_type        = con_type;

            cp.insert_con_pay();

            return(RedirectToAction("payment", "Information"));
        }
Esempio n. 7
0
        public IActionResult editAgent(string id)
        {
            SuplierModel sp = new SuplierModel();

            sp.select_suplier("sup_id = '" + id + "'");

            ViewData["sup_id"]           = id;
            ViewData["sup_code"]         = sp.sup_code;
            ViewData["sup_name"]         = sp.sup_name;
            ViewData["sup_name_contact"] = sp.sup_name_contact;
            ViewData["sup_tel"]          = sp.sup_tel;
            ViewData["sup_fax"]          = sp.sup_fax;
            ViewData["sup_email"]        = sp.sup_email;
            ViewData["sup_web"]          = sp.sup_web;
            ViewData["sup_trade"]        = sp.sup_trade;
            ViewData["sup_tax"]          = sp.sup_tax;
            ViewData["sup_num"]          = sp.sup_num;
            ViewData["sup_road"]         = sp.sup_road;
            ViewData["sup_postcode"]     = sp.sup_postcode;
            ViewData["sup_credit_money"] = sp.sup_credit_money;
            ViewData["sup_credit"]       = sp.credit_name;
            ViewData["sup_distict"]      = sp.district_name;
            ViewData["sup_amphur"]       = sp.amphur_name;
            ViewData["sup_province"]     = sp.province_name;
            ViewData["sup_prefix"]       = sp.prefix_name;
            ViewData["sup_prefix_end"]   = sp.prefix_end;

            conditionPayModel cd = new conditionPayModel();

            ViewData["credit"] = cd.drop_con_pay(sp.sup_credit_id);

            prefixModel px = new prefixModel();

            ViewData["prefix"] = px.drop_prefix(sp.sup_prefix_id);

            districts dt = new districts();

            ViewData["distict"] = dt.drop_district(sp.sup_district);

            ampuresModel am = new ampuresModel();

            ViewData["amphur"] = am.dorp_amphur(sp.sup_amphur);

            provinceModel pv = new provinceModel();

            ViewData["province"] = pv.drop_province(sp.sup_province);

            return(View());
        }
Esempio n. 8
0
        public IActionResult addAgent()
        {
            conditionPayModel cd = new conditionPayModel();

            ViewData["credit"] = cd.drop_con_pay("");

            prefixModel px = new prefixModel();

            ViewData["prefix"] = px.drop_prefix("");

            districts dt = new districts();

            ViewData["distict"] = dt.drop_district("");

            ampuresModel am = new ampuresModel();

            ViewData["amphur"] = am.dorp_amphur("");

            provinceModel pv = new provinceModel();

            ViewData["province"] = pv.drop_province("");

            return(View());
        }
Esempio n. 9
0
        public IActionResult editcustomer(string cus)
        {
            ViewData["cus_id"] = cus;

            CustomerModel ctm = new CustomerModel();

            ctm.select_customer(" cus_id = '" + cus + "'");
            ViewData["cus_code"]         = ctm.cus_code;
            ViewData["cus_name"]         = ctm.cus_name;
            ViewData["cus_name_contact"] = ctm.cus_name_contact;
            ViewData["cus_trade"]        = ctm.cus_trade;
            ViewData["cus_tax"]          = ctm.cus_tax;

            customerTypeModel ct = new customerTypeModel();

            ViewData["cus_type"] = ct.drop_cus_type_code(ctm.cus_ref_type_id);

            prefixModel px = new prefixModel();

            ViewData["prefix"] = px.drop_prefix(ctm.cus_ref_prefix_id);
            px.select_prefix("prefix_id = '" + ctm.cus_ref_prefix_id + "'");
            ViewData["last_name"] = px.prefix_ending;


            CustomerAddressModel ca = new CustomerAddressModel();

            ca.select_address("add_ref_cus_id = '" + cus + "'");
            ViewData["add_num"]      = ca.add_num;
            ViewData["add_alley"]    = ca.add_alley;
            ViewData["add_road"]     = ca.add_road;
            ViewData["add_postcode"] = ca.add_poscode;
            ViewData["add_status"]   = ca.add_type_status;
            ViewData["add_branch"]   = ca.add_branch;
            ViewData["add_id"]       = ca.add_id;

            provinceModel pv = new provinceModel();
            ampuresModel  am = new ampuresModel();
            districts     dt = new districts();

            ViewData["province"] = pv.drop_province(ca.add_province);
            ViewData["amphur"]   = am.dorp_amphur(ca.add_amphur);
            ViewData["district"] = dt.drop_district(ca.add_district);


            CustomerContactModel c_t = new CustomerContactModel();

            c_t.select_contact("ct_ref_cus_id = '" + cus + "'");
            ViewData["ct_tel"]   = c_t.ct_tel;
            ViewData["ct_fax"]   = c_t.ct_fax;
            ViewData["ct_email"] = c_t.ct_email;
            ViewData["ct_web"]   = c_t.ct_web;
            ViewData["ct_id"]    = c_t.ct_id;


            CustomerCreditModel crd = new CustomerCreditModel();

            crd.select_credit("credit_ref_cus_id = '" + cus + "'");
            ViewData["credit_money"] = crd.credit_money;
            ViewData["credit_id"]    = crd.credit_id;

            conditionPayModel cd = new conditionPayModel();

            ViewData["condition"] = cd.drop_con_pay(crd.credit_ref_condition);


            CustomerLineSaleModel cl = new CustomerLineSaleModel();

            cl.select_cus_line("cs_ref_cus_id = '" + cus + "'");
            ViewData["sale_name"] = cl.cs_sale_name;
            ViewData["sale_id"]   = cl.cs_id;

            lineModel ln = new lineModel();

            ViewData["line"] = ln.drop_line(cl.cs_ref_line_id);

            line_saleModel ls = new line_saleModel();

            ViewData["line_sale"] = ls.drop_line_sale("");


            CustomerTransportModel ts = new CustomerTransportModel();

            ts.select_cus_tran("at_ref_cus_id = '" + cus + "'");
            ViewData["name_ts"]     = ts.at_customer_name;
            ViewData["num_ts"]      = ts.at_num;
            ViewData["alley_ts"]    = ts.at_alley;
            ViewData["road_ts"]     = ts.at_road;
            ViewData["postcode_ts"] = ts.at_postcode;

            ViewData["province_ts"] = pv.drop_province(ts.at_province);
            ViewData["amphur_ts"]   = am.dorp_amphur(ts.at_amphur);
            ViewData["district_ts"] = dt.drop_district(ts.at_district);
            ViewData["ts_id"]       = ts.at_id;


            return(View());
        }