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()); }
// GET: /<controller>/ public IActionResult Index() { CompanyModel cp = new CompanyModel(); ampuresModel ap = new ampuresModel(); districts dt = new districts(); provinceModel pv = new provinceModel(); cp.select_comp(); ViewData["comp_address"] = cp.comp_address; ViewData["comp_amphur"] = ap.dorp_amphur(cp.comp_amphur); ViewData["comp_create_admin_id"] = cp.comp_create_admin_id; ViewData["comp_create_date"] = cp.comp_create_date; ViewData["comp_district"] = dt.drop_district(cp.comp_district); ViewData["comp_edit_date"] = cp.comp_edit_date; ViewData["comp_email"] = cp.comp_email; ViewData["comp_fax"] = cp.comp_fax; ViewData["comp_name"] = cp.comp_name; ViewData["comp_name_en"] = cp.comp_name_en; ViewData["comp_postcode"] = cp.comp_postcode; ViewData["comp_province"] = pv.drop_province(cp.comp_province); ViewData["comp_road"] = cp.comp_road; ViewData["comp_tax"] = cp.comp_tax; ViewData["comp_tel"] = cp.comp_tel; ViewData["comp_trade"] = cp.comp_trade; ViewData["comp_web"] = cp.comp_web; ViewData["comp_edit_admin_id"] = cp.comp_edit_admin_id; return(View()); }
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()); }
public IActionResult viewEmployee(string id) { employeeModel emp = new employeeModel(); prefixModel px = new prefixModel(); provinceModel pv = new provinceModel(); ampuresModel am = new ampuresModel(); districts dt = new districts(); positionModel ps = new positionModel(); emp.select_emp("emp_id = '" + id + "'"); ViewData["emp_code"] = emp.emp_code; ViewData["emp_prefix"] = px.drop_prefix(emp.emp_prefix); ViewData["emp_name"] = emp.emp_name; ViewData["emp_lastname"] = emp.emp_lastname; ViewData["emp_position"] = ps.drop_position(emp.emp_position); ViewData["emp_address"] = emp.emp_address; ViewData["emp_road"] = emp.emp_road; ViewData["emp_province"] = pv.drop_province(emp.emp_province); ViewData["emp_amphur"] = am.dorp_amphur(emp.emp_amphur); ViewData["emp_district"] = dt.drop_district(emp.emp_district); ViewData["emp_postcode"] = emp.emp_postcode; ViewData["emp_tel"] = emp.emp_tel; ViewData["emp_fax"] = emp.emp_fax; ViewData["emp_email"] = emp.emp_email; ViewData["emp_national_id"] = emp.emp_national_id; ViewData["emp_gender"] = emp.emp_gender; ViewData["emp_tax"] = emp.emp_tax; ViewData["emp_birth"] = emp.emp_birthday; ViewData["emp_start"] = emp.emp_start_date; ViewData["emp_end"] = emp.emp_end_date; ViewData["emp_id"] = id; if (string.IsNullOrEmpty(emp.emp_img) == true) { ViewData["emp_img"] = "nopicture.jpg"; } else { ViewData["emp_img"] = emp.emp_img; } return(View()); }
public IActionResult addEmployee() { provinceModel pv = new provinceModel(); ViewData["province"] = pv.drop_province("1"); ampuresModel am = new ampuresModel(); ViewData["amphur"] = am.dorp_amphur("1"); districts dt = new districts(); ViewData["district"] = dt.drop_district("1"); positionModel pt = new positionModel(); ViewData["position_list"] = pt.drop_position(); prefixModel px = new prefixModel(); ViewData["prefix"] = px.drop_prefix(""); return(View()); }
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()); }
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()); }