コード例 #1
0
        /// <summary>
        /// use for setting up default value
        /// </summary>
        /// <returns></returns>
        public ActionResult Update(int PositionID, string TargetID = "T_COM_Master_Positionlist")
        {
            T_COM_Master_Position objItem = T_COM_Master_PositionManager.GetById(PositionID);

            objItem.TargetDisplayID = TargetID;
            return(View(ViewFolder + "Create.cshtml", objItem));
        }
コード例 #2
0
        public ActionResult T_COM_Master_PositionEvt(int[] PositionID, string Action)
        {
            // You have your books IDs on the deleteInputs array
            switch (Action.ToLower())
            {
            case "delete":

                if (PositionID != null && PositionID.Length > 0)
                {
                    int length = PositionID.Length;
                    T_COM_Master_Position objItem;
                    for (int i = 0; i <= length - 1; i++)
                    {
                        objItem = T_COM_Master_PositionManager.GetById(PositionID[i]);
                        if (objItem != null)
                        {
                            T_COM_Master_PositionManager.Delete(objItem);
                        }
                    }
                    return(View(ViewFolder + "list.cshtml", T_COM_Master_PositionManager.GetAll()));
                }
                break;
            }


            return(View("PostFrm"));
        }
コード例 #3
0
        public ActionResult Get(int PositionID)
        {
            T_COM_Master_Position objItem = T_COM_Master_PositionManager.GetById(PositionID);

            return(View(objItem));
        }
コード例 #4
0
        public ActionResult Get(int PositionID, string action)
        {
            T_COM_Master_Position objItem = T_COM_Master_PositionManager.GetById(PositionID);

            return(Content(JsonConvert.SerializeObject(objItem), "application/json"));
        }