Ejemplo n.º 1
0
        public int Deleteconfig_major_kind(config_major_kind_Model cn)
        {
            int i = Delete(new config_major_kind()
            {
                mfk_id = cn.mfk_id
            });

            return(i);
        }
Ejemplo n.º 2
0
        public int Addconfig_major_kind(config_major_kind_Model cn)
        {
            config_major_kind c = new config_major_kind()
            {
                mfk_id          = cn.mfk_id,
                major_kind_id   = cn.major_kind_id,
                major_kind_name = cn.major_kind_name
            };

            return(Add(c));
        }
Ejemplo n.º 3
0
        public List <config_major_kind_Model> listconfig_major_kind()
        {
            List <config_major_kind_Model> list  = new List <config_major_kind_Model>();
            List <config_major_kind>       list1 = SelectAll();

            foreach (config_major_kind item in list1)
            {
                config_major_kind_Model CM = new config_major_kind_Model()
                {
                    major_kind_id   = item.major_kind_id,
                    major_kind_name = item.major_kind_name,
                    mfk_id          = item.mfk_id
                };
                list.Add(CM);
            }
            return(list);
        }
Ejemplo n.º 4
0
        public ActionResult config_major_kindAdd(config_major_kind_Model from)
        {
            string max = k.SelectMaxconfig_major_kind();
            string i   = from.major_kind_name;
            config_major_kind_Model c = new config_major_kind_Model()
            {
                major_kind_id   = max,
                major_kind_name = i
            };

            if (k.Addconfig_major_kind(c) > 0)
            {
                return(JavaScript("alert('新增成功');window.location.href='/Position/config_major_kind'"));
            }
            else
            {
                return(Content("<script>alert('新增失败');window.location.href='/Position/config_major_kind'</script>"));
            }
        }
Ejemplo n.º 5
0
 public int Deleteconfig_major_kind(config_major_kind_Model cn)
 {
     return(C.Deleteconfig_major_kind(cn));
 }
Ejemplo n.º 6
0
 public int Addconfig_major_kind(config_major_kind_Model cn)
 {
     return(C.Addconfig_major_kind(cn));
 }