예제 #1
0
        public ActionResult MisInfoView()
        {
            int       ID    = DataConverter.CLng(Request.QueryString["ID"]);
            M_MisInfo miMod = miBll.SelReturnModel(ID) ?? new M_MisInfo();

            return(View(miMod));
        }
예제 #2
0
        public ActionResult AddMisInfo()
        {
            int       id    = DataConverter.CLng(Request["ID"]);
            M_MisInfo miMod = miBll.SelReturnModel(id) ?? new M_MisInfo();

            return(View(miMod));
        }
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_MisInfo misMod = new M_MisInfo();

            if (Mid > 0)
            {
                misMod = misBll.SelReturnModel(Mid);
            }
            misMod.Title   = Title_T.Text;
            misMod.Type    = DataConvert.CLng(Type_DP.SelectedValue);
            misMod.IsShare = IsShare_RB.SelectedValue;
            misMod.IsElit  = DataConvert.CLng(IsElit_RB.SelectedValue);
            misMod.IsWarn  = IsWarn_RB.SelectedValue;
            misMod.Level   = DataConvert.CLng(Level_DP.SelectedValue);
            misMod.Content = Content_T.Text;
            if (Mid > 0)
            {
                misBll.UpdateByID(misMod);
            }
            else
            {
                M_UserInfo mu = buser.GetLogin();
                misMod.Inputer = mu.UserName;
                misMod.Status  = 0;
                misMod.MID     = mu.UserID;
                misBll.insert(misMod);
            }
            function.Script(this, "alert('操作成功!');HideMe();");
        }
예제 #4
0
        public void AddFiles_Add()
        {
            M_MisInfo misMod = new M_MisInfo();

            if (function.IsNumeric(Request.QueryString["ID"]))
            {
                int ID = DataConverter.CLng(Request.QueryString["ID"]);
                misMod = miBll.SelReturnModel(ID);
            }
            misMod.Title      = Request.Form["txttit"];
            misMod.CreateTime = DateTime.Now;
            misMod.ProID      = DataConverter.CLng(Request.QueryString["ProID"]);
            misMod.MID        = DataConverter.CLng(Request.QueryString["MID"]);
            misMod.Inputer    = buser.GetLogin().UserName;
            misMod.Type       = DataConverter.CLng(Request.QueryString["Type"]);
            if (Request.QueryString["ID"] != null)
            {
                miBll.UpdateByID(misMod);
                function.WriteSuccessMsg("修改成功!", "FilesList?ID=" + Request.QueryString["ID"] + "&ProID=" + Request.QueryString["ProID"] + "&MID=" + Request.QueryString["MID"] + "&Type=" + Request.QueryString["Type"]); return;
            }
            else
            {
                miBll.insert(misMod);
                function.WriteSuccessMsg("添加成功!", "FilesList?ProID=" + Request.QueryString["ProID"] + "&MID=" + Request.QueryString["MID"] + "&Type=" + Request.QueryString["Type"]); return;
            }
        }
예제 #5
0
        public void MyBind()
        {
            //日程列表
            DataTable dt      = typebll.SelByUid(UserID);
            M_MisInfo typeMod = null;

            if (dt.Rows.Count < 1)
            {
                typeMod = new M_MisInfo()
                {
                    Title = "默认日程", MID = UserID,
                };
                typeMod.ID = typebll.insert(typeMod);
                dt         = typebll.SelByUid(UserID);
                TypeID     = typeMod.ID;
            }
            if (TypeID == 0)
            {
                TypeID = typebll.SelFirstModel(UserID).ID;
            }
            if (TypeID > 0)
            {
                typeMod = typebll.SelReturnModel(TypeID);
                if (typeMod == null)
                {
                    function.WriteErrMsg("该类别日程不存在!");
                }
                TopSubName_Li.Text = "<span style='color:#999'>" + typeMod.Title + "</span>的";
            }
            else
            {
                TopSubName_Li.Text = "所有";
            }
            SubList_RPT.DataSource = dt;
            SubList_RPT.DataBind();

            if (dt.Rows.Count == 0)
            {
                EmptySub_Div.Visible = true;
            }
            else
            {
                EmptySub_Div.Visible = false;
            }

            dt = sdlBll.SelByWeek(curDate, UserID, TypeID);
            InitWeek(dt);
            //抽出最近日程
            dt = sdlBll.SelTopSubject(UserID, TypeID);
            MyTop_RPT.DataSource = dt;
            MyTop_RPT.DataBind();
            if (dt.Rows.Count == 0)
            {
                listempty_div.Visible = true;
            }
            else
            {
                listempty_div.Visible = false;
            }
        }
 public void MyBind()
 {
     if (Mid > 0)
     {
         M_MisInfo misMod = misBll.SelReturnModel(Mid);
         Title_T.Text             = misMod.Title;
         Type_DP.SelectedValue    = misMod.Type.ToString();
         IsShare_RB.SelectedValue = misMod.IsShare.ToString();
         IsElit_RB.SelectedValue  = misMod.IsElit.ToString();
         IsWarn_RB.SelectedValue  = misMod.IsWarn.ToString();
         Level_DP.SelectedValue   = misMod.Level.ToString();
         Content_T.Text           = misMod.Content;
     }
 }
예제 #7
0
        public ActionResult AddMemo()
        {
            int       ID    = DataConverter.CLng(Request.QueryString["ID"]);
            M_MisInfo miMod = miBll.SelReturnModel(ID) ?? new M_MisInfo();

            if (miMod.ID > 0)
            {
                ViewBag.ltlTitle = "修改提醒";
            }
            else
            {
                ViewBag.ltlTitle = "新建提醒";
            }
            ViewBag.uname = mu.UserName;
            return(View(miMod));
        }
예제 #8
0
        protected void AddType_B_Click(object sender, EventArgs e)
        {
            M_UserInfo mu      = buser.GetLogin();
            M_MisInfo  typeMod = TypeID > 0 ? typebll.SelReturnModel(TypeID) : new M_MisInfo();

            typeMod.Title = Type_T.Text;
            typeMod.MID   = mu.UserID;
            Type_T.Text   = "";
            if (typeMod.ID > 0)
            {
                typebll.UpdateByID(typeMod);
            }
            else
            {
                typebll.insert(typeMod);
            }
            function.Script(this, "refresh();");
        }
예제 #9
0
        protected void AddType_B_Click(object sender, EventArgs e)
        {
            int       typeid  = DataConvert.CLng(TypeID_Hid.Value);
            M_MisInfo typeMod = typeid > 0 ? typebll.SelReturnModel(typeid) : new M_MisInfo();

            typeMod.Title = Type_T.Text;
            typeMod.MID   = UserID;
            Type_T.Text   = "";
            if (typeid > 0)
            {
                typebll.UpdateByID(typeMod);
            }
            else
            {
                typebll.insert(typeMod);
            }
            MyBind();
        }
예제 #10
0
        public void AddMisInfo_Add()
        {
            int       id    = DataConverter.CLng(Request["ID"]);
            M_MisInfo miMod = miBll.SelReturnModel(id) ?? new M_MisInfo();

            miMod.Title      = Request.Form["Title"];
            miMod.Content    = Request.Form["Content"];
            miMod.CreateTime = DateTime.Now;
            miMod.ProID      = DataConverter.CLng(Request["ProID"]);
            miMod.MID        = DataConverter.CLng(Request["MID"]);
            miMod.Inputer    = buser.GetLogin().UserName;
            miMod.Type       = DataConverter.CLng(Request["Type"]);
            if (miMod.ID > 0)
            {
                miBll.UpdateByID(miMod);
                function.WriteSuccessMsg("修改成功!", "MisInfo?ID=" + miMod.ID + "&ProID=" + miMod.ProID + "&MID=" + miMod.MID + "&Type=" + miMod.Type); return;
            }
            else
            {
                miBll.insert(miMod);
                function.WriteSuccessMsg("添加成功!", "MisInfo?ProID=" + miMod.ProID + "&MID=" + miMod.MID + "&Type=" + miMod.Type); return;
            }
        }
예제 #11
0
 public int insert(M_MisInfo model)
 {
     return(Sql.insertID(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
예제 #12
0
 public bool UpdateByID(M_MisInfo model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }
예제 #13
0
 public int insert(M_MisInfo model)
 {
     return(DBCenter.Insert(model));
 }
예제 #14
0
 public bool UpdateByID(M_MisInfo model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }