예제 #1
0
        public ActionResult EditVendor(string id)
        {
            ssmtbl_CustomerModel objCustMod = new ssmtbl_CustomerModel();
            DropDownSelection    objDrop    = new DropDownSelection();

            ViewData["StateCodeDrpDwn"] = objDrop.State_CodeDropDown();
            id         = (id == null || id == "") ? "0" : id;
            objCustMod = objCustData.GetOneCustomer(Convert.ToInt32(id));
            GlobalFunction objGFunc = new GlobalFunction();

            objCustMod.VendorTypeListModel = objGFunc.VendorTypeList();
            //
            var connection = gConnection.Connection();

            connection.Open();
            string     sqlstr = "VendorPOType";
            SqlCommand cmd    = new SqlCommand(sqlstr, GlobalVariables.gConn);

            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Action", "select");
            cmd.Parameters.AddWithValue("@VendorId", id.Trim());
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataTable      dt = new DataTable();

            da.Fill(dt);
            DataRow[] dr = new DataRow[dt.Rows.Count];
            dt.Rows.CopyTo(dr, 0);
            int[] vtypeid = Array.ConvertAll(dr, new Converter <DataRow, int>(DataRowToDouble));
            connection.Close();
            //

            //int[] proinfo = new int [] { 1, 2 };
            ViewData["vtype"] = vtypeid;
            return(View(objCustMod));
        }
예제 #2
0
        public ActionResult NewCustomer()
        {
            ssmtbl_CustomerModel objCustMod = new ssmtbl_CustomerModel();
            DropDownSelection    objDrop    = new DropDownSelection();

            ViewData["StateCodeDrpDwn"] = objDrop.State_CodeDropDown();
            return(View(objCustMod));
        }
예제 #3
0
        public ActionResult EditCustomer(string id)
        {
            ssmtbl_CustomerModel objCustMod = new ssmtbl_CustomerModel();
            DropDownSelection    objDrop    = new DropDownSelection();

            ViewData["StateCodeDrpDwn"] = objDrop.State_CodeDropDown();
            id         = (id == null || id == "") ? "0" : id;
            objCustMod = objCustData.GetOneCustomer(Convert.ToInt32(id));
            return(View(objCustMod));
        }
예제 #4
0
        public ActionResult NewVendor()
        {
            ssmtbl_CustomerModel objCustMod = new ssmtbl_CustomerModel();

            objCustMod.Vendor_Code = objVendData.GetMaxVendorCode();
            DropDownSelection objDrop = new DropDownSelection();

            ViewData["StateCodeDrpDwn"] = objDrop.State_CodeDropDown();
            GlobalFunction objGFunc = new GlobalFunction();

            objCustMod.VendorTypeListModel = objGFunc.VendorTypeList();
            return(View(objCustMod));
        }