コード例 #1
0
 public JsonResult FillAgentGroup(Int64 ID_AgentGroup)
 {
     try
     {
         DataTable    dtbl         = new DataTable();
         BlAgentGroup blAgentGroup = new BlAgentGroup();
         blAgentGroup.MasterID   = ID_AgentGroup;
         blAgentGroup.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
         blAgentGroup.FK_Company = Convert.ToInt64(Session["ID_Company"]);
         dtbl = blAgentGroup.SelectAllData();
         return(Json(Converttojson(dtbl), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
コード例 #2
0
        public ActionResult UpdateAgentGroup(BlAgentGroup ObjBlAgentGroup)
        {
            long statusCode = 0;

            ObjBlAgentGroup.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
            ObjBlAgentGroup.FK_Company = Convert.ToInt64(Session["ID_Company"]);
            if (ObjBlAgentGroup.MasterID == 0)
            {
                statusCode = ObjBlAgentGroup.InsertData();
            }
            else
            {
                statusCode = ObjBlAgentGroup.UpdateData();
            }

            return(Json(new { statusCode = "" + statusCode + "" }, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public JsonResult DeleteAgentGroup(Int64 ID_AgentGroup)
        {
            try
            {
                long         statusCode   = 0;
                BlAgentGroup blAgentGroup = new BlAgentGroup();
                blAgentGroup.MasterID   = ID_AgentGroup;
                blAgentGroup.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
                blAgentGroup.FK_Company = Convert.ToInt64(Session["ID_Company"]);

                statusCode = blAgentGroup.DeleteData();
                return(Json(new { statusCode = "" + statusCode + "" }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(ex));
            }
        }
コード例 #4
0
        public JsonResult SelectAgentGroupAll(string PageIndex = "1", string SearchItem = "")
        {
            try
            {
                int          statusCode   = 1;
                DataTable    dtbl         = new DataTable();
                BlAgentGroup blAgentGroup = new BlAgentGroup();
                blAgentGroup.PageIndex  = Convert.ToInt32(PageIndex);
                blAgentGroup.FK_Company = Convert.ToInt64(Session["ID_Company"]);

                blAgentGroup.AgentGroupCode = SearchItem;
                blAgentGroup.AgentGroupName = SearchItem;

                dtbl = blAgentGroup.SelectAllData();
                return(Json(Converttojson(dtbl), JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                ///
                return(Json(ex));
            }
        }