Exemple #1
0
        public ActionResult GetView2Update(decimal pID)
        {
            AppDDSHCN_BL  _obj_bl = new AppDDSHCN_BL();
            AppDDSHCNInfo pInfo   = _obj_bl.AppDDSHCNGetById(pID);

            return(PartialView("~/Areas/DaiDienSHCN/Views/DDSHCN/_PartialDaiDienSHCNUpdate.cshtml", pInfo));
        }
Exemple #2
0
 public ActionResult SearchDDSHCN(string p_keysearch, int p_CurrentPage, string p_column, string p_type_sort)
 {
     try
     {
         string pTenDaidien = "";
         string pPhone      = "";
         if (p_keysearch.Contains("|"))
         {
             var array = p_keysearch.Split('|');
             pTenDaidien = array[0];
             pPhone      = array[1];
         }
         decimal              _total_record = 0;
         string               p_to          = "";
         string               p_from        = CommonFuc.Get_From_To_Page(p_CurrentPage, ref p_to);
         AppDDSHCN_BL         _obj_bl       = new AppDDSHCN_BL();
         List <AppDDSHCNInfo> _lst          = _obj_bl.AppDDSHCNGetAll(pTenDaidien, pPhone, 0, 0, ref _total_record);
         string               htmlPaging    = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <Timesheet_Info>((int)_total_record, 1, "Record");
         ViewBag.Paging    = htmlPaging;
         ViewBag.Obj       = _lst;
         ViewBag.SumRecord = _total_record;
         return(PartialView("~/Areas/DaiDienSHCN/Views/DDSHCN/_PartialTableDDSHCN.cshtml"));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(PartialView("~/Areas/DaiDienSHCN/Views/DDSHCN/_PartialTableDDSHCN.cshtml"));
     }
 }
Exemple #3
0
 public ActionResult GetView2Detail(decimal pID)
 {
     try
     {
         if (pID == 0)
         {
             return(Json(new { success = -3 }));
         }
         AppDDSHCN_BL  _obj_bl = new AppDDSHCN_BL();
         AppDDSHCNInfo pInfo   = _obj_bl.AppDDSHCNGetById(pID);
         return(PartialView("~/Areas/DaiDienSHCN/Views/DDSHCN/_PartialDaiDienSHCNDetail.cshtml", pInfo));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(Json(new { success = -3 }));
     }
 }
Exemple #4
0
 public ActionResult ExecuteDelete(decimal pId)
 {
     try
     {
         AppDDSHCN_BL _obj_bl  = new AppDDSHCN_BL();
         decimal      presonse = _obj_bl.AppDDSHCNDeleted(pId, SessionData.CurrentUser.Username, CommonFuc.CurrentDate());
         if (presonse >= 0)
         {
             MemoryData.GetCache_represent();
         }
         return(Json(new { success = presonse }));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(Json(new { success = -3 }));
     }
 }
Exemple #5
0
        public static void GetCache_represent()
        {
            try
            {
                //BussinessFacade.ModuleUsersAndRoles.UserBL _UserBL = new BussinessFacade.ModuleUsersAndRoles.UserBL();
                //List<UserInfo> _lstUsersAdmin = _UserBL.GetUserByType(3);
                //_lstUsersAdmin = _lstUsersAdmin.FindAll(x => x.Is_Agent == 1).ToList();
                //lstCache_Represent = new List<CustomerSuggestInfo>();

                //foreach (var item in _lstUsersAdmin)
                //{
                //    CustomerSuggestInfo pInfo = new CustomerSuggestInfo();

                //    pInfo.label = item.FullName + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + " Mã đại diện: " + item.Customer_Code;
                //    pInfo.value = item.FullName + "|" + item.Address + "|" + item.Phone + "|" + item.Fax + "|" + item.Email + "|" + item.Customer_Code;
                //    pInfo.name = item.FullName + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + item.Country;
                //    pInfo.Language = item.Language;

                //    lstCache_Represent.Add(pInfo);
                //}

                AppDDSHCN_BL         _obj_bl       = new AppDDSHCN_BL();
                decimal              _total_record = 0;
                List <AppDDSHCNInfo> _lst          = _obj_bl.AppDDSHCNGetAll("", "", 0, 0, ref _total_record);
                lstChuDDSHCN       = new List <CustomerSuggestInfo>();
                lstCache_Represent = new List <CustomerSuggestInfo>();
                foreach (var item in _lst)
                {
                    CustomerSuggestInfo pInfo = new CustomerSuggestInfo();
                    pInfo.label = item.Name_Vi + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + " Mã đại diện: " + item.MaNguoiDaiDien;
                    pInfo.value = item.Name_Vi + "|" + item.Address_Vi + "|" + item.Phone + "|" + item.Fax + "|" + item.Email + "|" + item.MaNguoiDaiDien
                                  + "|" + item.Country_Nationality.ToString() + "|" + item.Country_Residence.ToString() + "|" + item.Country_Incorporation.ToString();
                    pInfo.name = item.Name_Vi + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + item.Country;
                    lstChuDDSHCN.Add(pInfo);

                    lstCache_Represent.Add(pInfo);
                }
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
        }
Exemple #6
0
 public static void GetCacheDDSHCN()
 {
     try
     {
         lstChuDDSHCN.Clear();
         AppDDSHCN_BL         _obj_bl       = new AppDDSHCN_BL();
         decimal              _total_record = 0;
         CustomerSuggestInfo  pInfo;
         List <AppDDSHCNInfo> _lst = _obj_bl.AppDDSHCNGetAll("", "", 0, 0, ref _total_record);
         foreach (var item in _lst)
         {
             pInfo       = new CustomerSuggestInfo();
             pInfo.label = item.Name_Vi + ", " + item.Address_Vi;
             pInfo.value = item.Name_Vi + "|" + item.Address_Vi + "|" + item.Phone + "|" + item.Fax + "|" + item.Email + "|" + item.NguoiDDSH + "|" + item.MaNguoiDaiDien;
             pInfo.name  = item.Name_Vi + ", " + item.Address_Vi;
             lstChuDDSHCN.Add(pInfo);
         }
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
     }
 }
Exemple #7
0
 public ActionResult GetListDDSHCN()
 {
     try
     {
         if (SessionData.CurrentUser == null)
         {
             return(Redirect("/"));
         }
         decimal              _total_record = 0;
         AppDDSHCN_BL         _obj_bl       = new AppDDSHCN_BL();
         List <AppDDSHCNInfo> _lst          = _obj_bl.AppDDSHCNGetAll("", "", 0, 0, ref _total_record);
         string htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <AppDDSHCNInfo>((int)_total_record, 1, "Record");
         ViewBag.Obj       = _lst;
         ViewBag.Paging    = htmlPaging;
         ViewBag.SumRecord = _total_record;
         return(View("~/Areas/DaiDienSHCN/Views/DDSHCN/DDSHCNList.cshtml"));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(View());
     }
 }
Exemple #8
0
 public ActionResult ExecuteUpdate(AppDDSHCNInfo pInfo)
 {
     try
     {
         if (pInfo == null)
         {
             return(Json(new { success = -3 }));
         }
         pInfo.Modifiedby   = SessionData.CurrentUser.Username;
         pInfo.Modifieddate = CommonFuc.CurrentDate();
         AppDDSHCN_BL _obj_bl  = new AppDDSHCN_BL();
         decimal      presonse = _obj_bl.AppDDSHCNUpdate(pInfo);
         if (presonse >= 0)
         {
             MemoryData.GetCache_represent();
         }
         return(Json(new { success = presonse }));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(Json(new { success = -3 }));
     }
 }