Exemple #1
0
 public JsonResult DeleteReseller(Int64 ID_Reseller)
 {
     try
     {
         long       statusCode = 0;
         BlReseller blclient   = new BlReseller();
         blclient.MasterID   = ID_Reseller;
         blclient.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
         blclient.FK_Company = Convert.ToInt64(Session["ID_Company"]);
         statusCode          = blclient.DeleteData();
         return(Json(new { statusCode = "" + statusCode + "" }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
Exemple #2
0
        public ActionResult UpdateReseller(BlReseller ObjBlReseller)
        {
            long statusCode = 0;

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

            return(Json(new { statusCode = "" + statusCode + "" }, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
 public JsonResult FillReseller(Int64 ID_Reseller)
 {
     try
     {
         DataTable  dtbl     = new DataTable();
         BlReseller blclient = new BlReseller();
         blclient.MasterID   = ID_Reseller;
         blclient.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
         blclient.FK_Company = Convert.ToInt64(Session["ID_Company"]);
         dtbl = blclient.SelectAllData();
         return(Json(Converttojson(dtbl), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
Exemple #4
0
        public JsonResult SelectResellerAll(string PageIndex = "1", string SearchItem = "")
        {
            try
            {
                int        statusCode = 1;
                DataTable  dtbl       = new DataTable();
                BlReseller blReseller = new BlReseller();
                blReseller.PageIndex  = Convert.ToInt32(PageIndex);
                blReseller.FK_Company = Convert.ToInt64(Session["ID_Company"]);

                blReseller.ResCode  = SearchItem;
                blReseller.ResName  = SearchItem;
                blReseller.ResEmail = SearchItem;

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