public string GetOrgVersion() { using (CompanyBLL bll = new CompanyBLL()) { return(bll.ReadVersion()); } }
/// <summary> /// 编辑附件 /// </summary> public void EditAttachment(com_attachment att, long userId) { var oldAtt = dal.FindNoDeleteById(att.id); if (oldAtt == null) { return; } att.update_time = Tools.Date.DateHelper.ToUniversalTimeStamp(DateTime.Now); att.update_user_id = userId; dal.Update(att); OperLogBLL.OperLogUpdate <com_attachment>(att, oldAtt, att.id, userId, DicEnum.OPER_LOG_OBJ_CATE.ATTACHMENT, ""); if (att.object_type_id == (int)DicEnum.ATTACHMENT_OBJECT_TYPE.TASK) { var task = new sdk_task_dal().FindNoDeleteById(att.object_id); if (task != null) { #region 更新客户最后活动时间 crm_account thisAccount = new CompanyBLL().GetCompany(task.account_id); if (thisAccount != null) { thisAccount.last_activity_time = Tools.Date.DateHelper.ToUniversalTimeStamp(DateTime.Now); new CompanyBLL().EditAccount(thisAccount, userId); } #endregion } } }
public ActionResult Edit(int id = 0) { CompanyBLL cb = new CompanyBLL(); Company c = cb.GetCompanyDetails(WebSecurity.CurrentUserId); return(View(c)); }
public void DeleteCompany(HttpContext context) { string result = string.Empty; try { var CompanyId = DNTRequest.GetString("CompanyId"); if (string.IsNullOrEmpty(CompanyId)) { result = DNTRequest.GetResultJson(false, "请先选择一条数据", null); return; } else { CompanyBLL companybll = new CompanyBLL(); Company modelMachine = new Company(); bool res = companybll.Delete(Convert.ToInt32(CompanyId), ComPage.CurrentUser.UserID); if (res) { result = DNTRequest.GetResultJson(true, "删除渠道成功", null); } else { result = DNTRequest.GetResultJson(false, "删除渠道失败,请稍后再试", null); } } } catch (Exception ex) { result = DNTRequest.GetResultJson(false, "删除渠道异常,请稍后再试", null); ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString()); } context.Response.Write(result); }
protected override void PageLoad() { base.PageLoad(); base.Title = "¹«Ë¾±à¼"; base.CheckUserPower("ReadCompany,UpdateCompany,UpdateSubCompany", PowerCheckType.OR); string sonCompanyID = CookiesHelper.ReadCookieValue("UserCompanySonCompanyID"); if (companyID > 0) { if (!StringHelper.CompareSingleString(sonCompanyID, companyID.ToString())) { ScriptHelper.Alert("Òì³£"); } } else { companyID = base.UserCompanyID; } company = CompanyBLL.ReadCompany(companyID); if (StringHelper.CompareSingleString(company.BrandId, "0")) { productBrandList = ProductBrandBLL.ReadProductBrandCacheList(); } else { productBrandList = ProductBrandBLL.ReadProductBrandCacheList(company.BrandId); } departmentList = PostBLL.ReadParentPostListByPostId(company.Post); postList = PostBLL.ReadPostListByPostId(company.Post); if (company.GroupId == (int)CompanyType.SubCompany || company.GroupId == (int)CompanyType.SubGroup) { parentCompanyPath = CompanyBLL.ReadParentCompanyName(company.ParentId); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //设置默认值 if (string.IsNullOrEmpty(action)) { groupID = "36"; state = ((int)UserState.Normal).ToString(); passState = "1,2,3"; } try { endDate = Convert.ToDateTime(RequestHelper.GetQueryString <string>("SearchEndDate")); if (endDate > DateTime.Today) { endDate = DateTime.Today; } } catch { endDate = DateTime.Today; } SearchEndDate.Text = endDate.ToString("d"); if (action == "search") { CompanyModel = CompanyBLL.ReadCompany(companyID); CompanyName.Value = CompanyModel.CompanyName; HtmlOut(); } } }
protected void Page_Load(object sender, EventArgs e) { LoanTermStringBuilder(); strLoanUseStringBuilder(); if (!IsPostBack) { try { CompanyBLL opCompanyBLL = new CompanyBLL(); Company model = opCompanyBLL.GetModel(companyId); if (model != null) { if (model.IsRelyOnPrimaryKey != 1) { if (!string.IsNullOrEmpty(model.RecommendationCode)) { recommendationCode = model.RecommendationCode; } } } } catch (Exception ex) { ExceptionLogBLL.WriteExceptionLogToDB(Title + "," + ex.ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { pnlRed.Visible = false; pnlGreen.Visible = false; pnlYellow.Visible = false; pnlBlue.Visible = false; SB = new ServiceBusiness(); AB = new AccountBusiness(); EB = new EmployeeBusiness(); DB = new DepartmentBusiness(); CB = new CompanyBLL(); OB = new OrderBusiness(); GetRouteData(); cvBillDate.ValueToCompare = DateTime.Now.Date.ToShortDateString(); if (!IsPostBack) { loadData(); } else { String script = WebHelper.Instance.GetJqueryScript("App_Themes/js/jquery/custom_jquery.js"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "MessageWarning", script, true); } }
protected void Login1_Authenticate1(object sender, AuthenticateEventArgs e) { if (Membership.ValidateUser(Login1.UserName, Login1.Password) == true) { Login1.Visible = true; // Session["user"] = HttpContext.Current.User.Identity.Name; // Session["user1"] = Login1.UserName; FormsAuthentication.RedirectFromLoginPage(Login1.UserName, true); //check user is a Client bool isClient = AppSettings.IsUserOfType(Login1.UserName, isTypeClient: true); //is so redirect to config panel if (isClient) { Guid clientASPID = (Guid)AppSettings.GetUserIDByUserName(Login1.UserName); int clientID = (int)ClientBLL.GetPersonIDByASPuserID(clientASPID); //get compId int?curCoID = CompanyBLL.GetCompanyIDByClientID(clientID); if (curCoID != null) { SessionVariables.CompanyID = curCoID; } Response.Redirect("~/UI/ConfigPanel/Welcome.aspx"); } //else //end-user? redirect to clients page??18/7/16 } else { Response.Write("Invalid Login"); } }
private void ShowReceivables(string customerID) { CompanyBLL bll = new CompanyBLL(AppSettings.Current.ConnStr); CustomerReceivableSearchCondition con = new CustomerReceivableSearchCondition(); con.CustomerID = customerID; con.ReceivableTypes = new List <CustomerReceivableType>(); if (PaymentType == CustomerPaymentType.Customer) { con.ReceivableTypes.Add(CustomerReceivableType.CustomerOtherReceivable); con.ReceivableTypes.Add(CustomerReceivableType.CustomerReceivable); } else { con.ReceivableTypes.Add(CustomerReceivableType.SupplierOtherReceivable); con.ReceivableTypes.Add(CustomerReceivableType.SupplierReceivable); } con.Settled = false; List <CustomerReceivable> items = (new CustomerReceivableBLL(AppSettings.Current.ConnStr)).GetItems(con).QueryObjects; if (items != null && items.Count > 0) { items = (from item in items orderby item.CreateDate ascending, item.SheetID ascending select item).ToList(); foreach (CustomerReceivable cr in items) { if (cr.Remain > 0) //只核销金额为正的应收或应付 { int row = GridView.Rows.Add(); ShowItemInGridViewRow(GridView.Rows[row], cr); } } } }
public int BackgroundRefreshTime = int.Parse(LinkFun.ConfigString("BackgroundRefreshTime", "7200000")); //背景刷新时间 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ProductIndexRefreshTime = LinkFun.ConfigString("ProductIndexRefreshTime", "7200000"); //LinkFun.getProductIndexRefreshTime(); ProductsBLL adHelper = new ProductsBLL(); ProductCategoryBLL oProductCategoryBLL = new ProductCategoryBLL(); oCategoryList = oProductCategoryBLL.GetCardTypeList(); LoginUserCookie cookie = MerchantFrontCookieBLL.GetMerchantFrontUserCookie(); magName = cookie.LoginName; CompanyBLL opCompanyBLL = new CompanyBLL(); StringBuilder where = new StringBuilder(); //where.AppendFormat("IsDeleted=0 and CompanyCategoryId=2 order by OrderId asc"); //litCompanyNetLoan = opCompanyBLL.GetModelList(where.ToString()); where = new StringBuilder(); where.AppendFormat("IsDeleted=0 and CompanyCategoryId=4 order by OrderId asc"); litCompanyBank = opCompanyBLL.GetModelList(where.ToString()); where = new StringBuilder(); where.AppendFormat("IsDeleted=0 and CompanyCategoryId=5 order by OrderId asc"); litCompanyOther = opCompanyBLL.GetModelList(where.ToString()); } }
protected string GetData() { var flyList = new FlyNumModel(); if (string.IsNullOrEmpty(User.CompanyCode3)) { var companyList = new CompanyBLL().GetAllCode3(); flyList.NameItem = companyList; foreach (var company in companyList) { var fly = new FlyNumData(); fly.name = company; fly.value = new CurrentPlanBLL().GetFlyNum(company); flyList.FlyNumData.Add(fly); } } else { for (int i = 0; i < 6; i++) { var begin = new DateTime(DateTime.Now.AddMonths(-i).Year, DateTime.Now.AddMonths(-i).Month, 1); var end = new DateTime(begin.AddMonths(1).Year, begin.AddMonths(1).Month, 1); var fly = new FlyNumData(); fly.name = begin.ToString("yyyy年MM月"); fly.value = new CurrentPlanBLL().GetFlyNum(User.CompanyCode3, begin, end); flyList.NameItem.Add(fly.name); flyList.FlyNumData.Add(fly); } } return(JsonConvert.SerializeObject(flyList)); }
protected override List <object> GetDataSource() { CustomerPaymentSearchCondition cpsc = new CustomerPaymentSearchCondition(); cpsc.PaymentTypes = new List <CustomerPaymentType>(); cpsc.PaymentTypes.Add(CustomerPaymentType.Supplier); cpsc.States = new List <SheetState>(); cpsc.States.Add(SheetState.Approved); cpsc.HasRemain = true; _CustomerPayments = (new CustomerPaymentBLL(AppSettings.Current.ConnStr)).GetItems(cpsc).QueryObjects; CustomerReceivableSearchCondition crsc = new CustomerReceivableSearchCondition(); crsc.Settled = false; crsc.ReceivableTypes = new List <CustomerReceivableType>(); crsc.ReceivableTypes.Add(CustomerReceivableType.SupplierReceivable); crsc.ReceivableTypes.Add(CustomerReceivableType.SupplierOtherReceivable); _CustomerReceivables = (new CustomerReceivableBLL(AppSettings.Current.ConnStr)).GetItems(crsc).QueryObjects; CompanyBLL bll = new CompanyBLL(AppSettings.Current.ConnStr); if (SearchCondition == null) { CustomerSearchCondition con = new CustomerSearchCondition(); con.ClassID = CompanyClass.Supplier; _Customers = bll.GetItems(con).QueryObjects; } else { _Customers = bll.GetItems(SearchCondition).QueryObjects; } List <object> records = FilterData(); return(records); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //设置默认值 if (string.IsNullOrEmpty(action)) { groupID = "36"; state = ((int)UserState.Normal).ToString(); } else { startDate = string.IsNullOrEmpty(RequestHelper.GetQueryString <string>("SearchStartDate")) ? DateTime.MinValue : Convert.ToDateTime(RequestHelper.GetQueryString <string>("SearchStartDate")); endDate = string.IsNullOrEmpty(RequestHelper.GetQueryString <string>("SearchEndDate")) ? DateTime.MinValue : Convert.ToDateTime(RequestHelper.GetQueryString <string>("SearchEndDate")); companyName = CompanyBLL.ReadCompany(companyID).CompanyName; if (startDate != DateTime.MinValue) { SearchStartDate.Text = startDate.ToString("d"); } if (endDate != DateTime.MinValue) { SearchEndDate.Text = endDate.ToString("d"); } if (!string.IsNullOrEmpty(searchCourseName) && companyID > 0) { CourseName.Text = searchCourseName; ReportList.InnerHtml = GetReportList(); ShowArea.Style["display"] = "block"; } } } }
protected string GetData() { var flyList = new FlyTimeModel(); if (string.IsNullOrEmpty(User.CompanyCode3)) { flyList.NameItem.Add("各公司飞行时长(分钟)"); var companyList = new CompanyBLL().GetAllCode3(); foreach (var company in companyList) { var fly = new FlyTimeData(); fly.name = company; fly.data.Add(new CurrentPlanBLL().GetFlyTime(company)); flyList.FlyTimeData.Add(fly); } flyList.FlyTimeData = flyList.FlyTimeData.OrderByDescending(o => o.data[0]).ToList(); } else { flyList.NameItem.Add("各月份飞行时长(分钟)"); for (int i = 0; i < 6; i++) { var begin = new DateTime(DateTime.Now.AddMonths(-i).Year, DateTime.Now.AddMonths(-i).Month, 1); var end = new DateTime(begin.AddMonths(1).Year, begin.AddMonths(1).Month, 1); var fly = new FlyTimeData(); fly.name = begin.ToString("yyyy年MM月"); fly.data.Add(new CurrentPlanBLL().GetFlyTime(User.CompanyCode3, begin, end)); flyList.FlyTimeData.Add(fly); } } return(JsonConvert.SerializeObject(flyList)); }
public string GetSearchTitle() { if (RequestHelper.GetQueryString <string>("Action") == "search") { StringBuilder HtmlOut = new StringBuilder(); if (CompanyID >= 0) { if (CompanyID == CompanyBLL.SystemCompanyId) { HtmlOut.Append("系统指标"); } else { HtmlOut.Append(CompanyBLL.ReadCompany(CompanyID).CompanyName); } } if (!string.IsNullOrEmpty(Name)) { HtmlOut.Append(" [指标:" + Name + "] "); } if (ClassID > 0) { HtmlOut.Append(" [分类:" + KPIBLL.ReadKPI(ClassID).Name + "] "); } if (!string.IsNullOrEmpty(HtmlOut.ToString())) { HtmlOut.Insert(0, "<tr><td colspan=\"7\">"); HtmlOut.Append("</td></tr>"); } return(HtmlOut.ToString()); } return(string.Empty); }
public void OrgChange() { using (CompanyBLL bll = new CompanyBLL()) { bll.OrgChange(); } }
/// <summary> /// 读取公司信息 /// </summary> /// <param name="companyID"></param> /// <returns></returns> protected CompanyInfo ReadCompany(int companyID) { if (!companyDic.ContainsKey(companyID)) { companyDic.Add(companyID, CompanyBLL.ReadCompany(companyID)); } return(companyDic[companyID]); }
public List <string> GetOrgnazationsBystep(string userID, string perm, string entity, string flag, string orgID) { using (CompanyBLL bll = new CompanyBLL()) { List <string> orgInfo = bll.GetOrgnazationsBystep(userID, perm, entity, flag, orgID); return(orgInfo); } }
public List <T_HR_COMPANY> GetCompanyAll(string userID) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable <T_HR_COMPANY> ents = bll.GetCompanyAll(userID); return(ents.Count() > 0 ? ents.ToList() : null); } }
protected string GetCompanyName(int companyID) { if (!companyNameDic.ContainsKey(companyID)) { companyNameDic.Add(companyID, CompanyBLL.ReadCompany(companyID).CompanySimpleName); } return(companyNameDic[companyID]); }
public List <V_COMPANY> GetCompanyView(string userID, string perm, string entity) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable <V_COMPANY> ents = bll.GetCompanyView(userID, perm, entity); return(ents.Count() > 0 ? ents.ToList() : null); } }
/// <summary> /// 获取配置项相关详情数据 /// </summary> private void GetInsProDetail(HttpContext context) { var insProId = context.Request.QueryString["insProId"]; if (!string.IsNullOrEmpty(insProId)) { var insPr = new crm_installed_product_dal().FindNoDeleteById(long.Parse(insProId)); if (insPr != null) { string name = ""; string contactName = ""; string contactId = ""; string insTime = ""; string insUser = ""; string insWarnTime = ""; // 保修期 string vendorId = ""; string vendorName = ""; string insService = ""; int relateNum = 0; // 相关配置项 var thisPro = new ivt_product_dal().FindNoDeleteById(insPr.product_id); if (thisPro != null) { name = thisPro.name; } if (insPr.contact_id != null) { var contact = new crm_contact_dal().FindNoDeleteById((long)insPr.contact_id); if (contact != null) { contactId = contact.id.ToString(); contactName = contact.name; } } if (insPr.installed_resource_id != null) { var insRes = new sys_resource_dal().FindNoDeleteById((long)insPr.installed_resource_id); if (insRes != null) { insUser = insRes.name; } } if (insPr.vendor_account_id != null) { var thisVnedor = new CompanyBLL().GetCompany((long)insPr.vendor_account_id); if (thisVnedor != null) { vendorId = thisVnedor.id.ToString(); vendorName = thisVnedor.name; } } insTime = Tools.Date.DateHelper.ConvertStringToDateTime(insPr.create_time).ToString("yyyy-MM-dd"); context.Response.Write(new Tools.Serialize().SerializeJson(new { id = insPr.id, name = name, contactId = contactId, contactName = contactName, insTime = insTime, insUser = insUser, insWarnTime = insWarnTime, vendorId = vendorId, vendorName = vendorName, insService = insService, relateNum = relateNum })); } } }
public List <T_HR_COMPANY> GetCompanyActived(string userID) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable <T_HR_COMPANY> ents = bll.GetCompanyActived(userID); // Tracer.Serializer(ents.ToList(), "ActivedCompany"); return(ents.Count() > 0 ? ents.ToList() : null); } }
private void GetCompanyPropertyJson(HttpContext context, string account_id, string propertyName) { var account = new CompanyBLL().GetCompany(long.Parse(account_id)); if (account != null) { context.Response.Write(new Serialize().SerializeJson(BaseDAL <Core.crm_account> .GetObjectPropertyValue(account, propertyName))); } }
/// <summary> /// 获取客户详情 /// </summary> private void GetAccDetail(HttpContext context) { var accountId = context.Request.QueryString["account_id"]; if (!string.IsNullOrEmpty(accountId)) { var thisAcc = new CompanyBLL().GetCompany(long.Parse(accountId)); if (thisAcc != null) { // 返回客户Id,名称,地址信息 var location = new LocationBLL().GetLocationByAccountId(thisAcc.id); string city = ""; string provice = ""; string quXian = ""; string address1 = ""; string address2 = ""; string postalCode = ""; int ticketNum = 0; // 所有打开的工单的数量 int monthNum = 0; // 近三十天工单的数量 if (location != null) { var thisCity = new d_district_dal().FindById(location.city_id); if (thisCity != null) { city = thisCity.name; } var thisprovice = new d_district_dal().FindById(location.province_id); if (thisprovice != null) { provice = thisprovice.name; } if (location.district_id != null) { var thisquXian = new d_district_dal().FindById((long)location.district_id); if (thisquXian != null) { quXian = thisquXian.name; } } address1 = location.address; address2 = location.additional_address; if (!string.IsNullOrEmpty(location.postal_code)) { postalCode = location.postal_code; } } var ticketList = new sdk_task_dal().GetTicketByAccount(thisAcc.id); if (ticketList != null && ticketList.Count > 0) { ticketNum = ticketList.Count; } context.Response.Write(new Tools.Serialize().SerializeJson(new { id = thisAcc.id, name = thisAcc.name, phone = thisAcc.phone, city = city, provice = provice, quXian = quXian, address1 = address1, address2 = address2, ticketNum = ticketNum, monthNum = monthNum, postalCode = postalCode })); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int id = RequestHelper.GetQueryString <int>("ID"); string Action = RequestHelper.GetQueryString <string>("Action"); if (Action == "Search") { string searchName = RequestHelper.GetQueryString <string>("username"); string searchCompanyName = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("companyname").Trim()); string searchPostName = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("postname").Trim()); DateTime startDate = RequestHelper.GetQueryString <DateTime>("StartDate"); DateTime endDate = RequestHelper.GetQueryString <DateTime>("EndDate"); int pageCount = RequestHelper.GetQueryString <int>("PageCount"); if (pageCount > 0) { base.PageSize = pageCount; this.PageCount.Text = pageCount.ToString(); } CompanyName.Text = searchCompanyName; SearchName.Text = searchName; PostName.Text = searchPostName; if (startDate != DateTime.MinValue) { SearchStartDate.Text = startDate.ToString("d"); } if (endDate != DateTime.MinValue) { SearchEndDate.Text = endDate.ToString("d"); } base.CheckAdminPower("ReadTestPaper", PowerCheckType.Single); PostPassInfo postpassSearch = new PostPassInfo(); postpassSearch.SearchStartDate = startDate; postpassSearch.CreateDate = ShopCommon.SearchEndDate(endDate); postpassSearch.PostName = searchPostName; if (!string.IsNullOrEmpty(searchCompanyName)) { postpassSearch.InCompanyID = CompanyBLL.ReadCompanyIdStr(searchCompanyName, 1); } if (!string.IsNullOrEmpty(searchName)) { UserSearchInfo user = new UserSearchInfo(); user.RealName = searchName; postpassSearch.InUserID = UserBLL.ReadUserIdStr(UserBLL.SearchUserList(user)); if (string.IsNullOrEmpty(postpassSearch.InUserID)) { postpassSearch.InUserID = "0"; } } base.BindControl(PostPassBLL.ReadPostPassList(postpassSearch, base.CurrentPage, base.PageSize, ref this.Count), this.RecordList, this.MyPager); } } }
protected string GetCompanyNameByID(string companyID) { DataSet ds = CompanyBLL.GetCompanyByID(companyID); if (ds.Tables[0].Rows.Count > 0) { return(ds.Tables[0].Rows[0]["CompanyName"].ToString()); } return(""); }
protected override void PageLoad() { //string allCompanyID = CompanyBLL.SystemCompanyId + "," + base.ParentCompanyID + "," + base.SonCompanyID; base.PageLoad(); base.Title = "KPI指标列表"; string action = RequestHelper.GetQueryString <string>("Action"); if (action == "Delete") { string selectID = RequestHelper.GetQueryString <string>("SelectID"); if (!string.IsNullOrEmpty(selectID)) { base.CheckUserPower("DeleteKPI", PowerCheckType.Single); KPIBLL.DeleteKPI(selectID); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("KPI"), selectID); ResponseHelper.Redirect(Request.UrlReferrer.ToString()); } } base.CheckUserPower("ReadKPI", PowerCheckType.Single); Company = CompanyBLL.ReadCompany(CompanyID); KPISearchInfo kpiSearch = new KPISearchInfo(); kpiSearch.ParentId = "0"; KPIClassList = KPIBLL.SearchKPIList(kpiSearch); if (ClassID > 0) { kpiSearch.ParentId = ClassID.ToString(); } else { kpiSearch.ParentId = string.Empty; } kpiSearch.Name = Name; if (CompanyID < 0) { kpiSearch.CompanyID = CompanyBLL.SystemCompanyId.ToString(); if (!string.IsNullOrEmpty(base.ParentCompanyID)) { kpiSearch.CompanyID += "," + base.ParentCompanyID; } if (!string.IsNullOrEmpty(base.SonCompanyID)) { kpiSearch.CompanyID += "," + base.SonCompanyID; } } else { kpiSearch.CompanyID = CompanyID.ToString(); } KPIList = KPIBLL.SearchKPIList(kpiSearch, base.CurrentPage, base.PageSize, ref this.Count); base.BindPageControl(ref base.CommonPager); }
private void cFMSE110010_Load(object sender, EventArgs e) { try { companyBLL = new CompanyBLL(); companyML = companyBLL.GetEntity(); if (companyML != null) { RFCTextBox.Text = companyML.Rfc; RazonSocialTextBox.Text = companyML.BusinessName; CalleTextBox.Text = companyML.Street; MunicipioTextBox.Text = companyML.Municipality; PaisTextBox.Text = companyML.Country; CorreoTextBox.Text = companyML.Email; EstadoTextBox.Text = companyML.State; CodigoPostalTextBox.Text = companyML.PostalCode; TelefonoTextBox.Text = companyML.Telephone; textBoxNumberUsers.Text = companyML.NumberUserEmploye; if (!string.IsNullOrEmpty(companyML.Image)) { PathFileNameTextBox.Text = string.Format("{0}\\{1}", System.IO.Path.GetFullPath(GlobalBLL.DirectoryFiles), companyML.Image); if (System.IO.File.Exists(PathFileNameTextBox.Text)) { LogoPictureBox.BackgroundImage = new Bitmap(PathFileNameTextBox.Text); } else { throw new Exception("No se encontró la imagen"); } } } else { companyML = new CompanyML(); } LoadUser(); if (!System.IO.Directory.Exists(GlobalBLL.DirectoryFiles)) { System.IO.Directory.CreateDirectory(GlobalBLL.DirectoryFiles); } } catch (Exception ex) { Alerts.cFAT100010 alr = new Alerts.cFAT100010("EROR", string.Format("cFMSE110010_Load: {0}", ex.Message), MessageBoxIcon.Error); alr.ShowDialog(); } }
public List<V_COMPANY> GetCompanyViewByApproval(string userID, string perm, string entity) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<V_COMPANY> ents = bll.GetCompanyViewByApproval(userID, perm, entity); return ents.Count() > 0 ? ents.ToList() : null; } }
public bool IsChildCompany(string companyID, string parentCompanyID) { using (CompanyBLL bll = new CompanyBLL()) { return bll.IsChildCompany(companyID, parentCompanyID); } }
public bool IsTopCompanySmt(string companyid) { using (CompanyBLL bll = new CompanyBLL()) { return IsTopCompanySmt(companyid); } }
public void CompanyDelete(string id, ref string strMsg) { using (CompanyBLL bll = new CompanyBLL()) { bll.CompanyDelete(id, ref strMsg); } }
public bool CompanyCancel(T_HR_COMPANY entity, ref string strMsg) { using (CompanyBLL bll = new CompanyBLL()) { return bll.CompanyCancel(entity, ref strMsg); } }
public List<T_HR_COMPANY> GetCompanyByEntityPerm(string userID, string perm, string entity) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<T_HR_COMPANY> ents = null; if (string.IsNullOrEmpty(perm) || string.IsNullOrEmpty(entity)) ents = bll.GetCompanyActived(userID); else ents = bll.GetCompanyActived(userID, perm, entity); return ents != null && ents.Count() > 0 ? ents.ToList() : null; } }
public List<T_HR_COMPANY> GetCompanyByIds(string[] ids) { using (CompanyBLL bll = new CompanyBLL()) { return bll.GetCompanyByIds(ids); } }
public List<string> GetOrgnazationsBystep(string userID, string perm, string entity, string flag, string orgID) { using (CompanyBLL bll = new CompanyBLL()) { List<string> orgInfo = bll.GetOrgnazationsBystep(userID, perm, entity, flag, orgID); return orgInfo; } }
public List<T_HR_COMPANY> CompanyPaging(int pageIndex, int pageSize, string sort, string filterString, IList<object> paras, ref int pageCount, string userID, string checkState) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<T_HR_COMPANY> ents = bll.CompanyPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, userID, checkState); if (ents != null) { return ents.Count() > 0 ? ents.ToList() : null; } else { return null; } } // return ents.Count() > 0 ? ents.ToList() : null; }
public T_HR_COMPANY GetCompanyById(string companyID) { using (CompanyBLL bll = new CompanyBLL()) { return bll.GetCompanyById(companyID); } }
public List<string> GetChildCompanyByCompanyID(List<string> companyIDs) { using (CompanyBLL bll = new CompanyBLL()) { return bll.GetChildCompanyByCompanyID(companyIDs); } }
public List<string> GetAllParentsCompamy(string employeeID) { using (CompanyBLL bll = new CompanyBLL()) { List<string> ents = bll.GetAllParentsCompamy(employeeID); if (ents != null) { return ents.Count() > 0 ? ents.ToList() : null; } else { return null; } } }
public List<T_HR_COMPANY> GetCompanyAll(string userID) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<T_HR_COMPANY> ents = bll.GetCompanyAll(userID); return ents.Count() > 0 ? ents.ToList() : null; } }
public List<V_COMPANY> GetALLCompanyView(string userID) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<V_COMPANY> ents = bll.GetALLCompanyView(userID); return ents.Count() > 0 ? ents.ToList() : null; } }
public List<T_HR_COMPANY> GetCompanyWithSpecifiedTime(string startDate) { using (CompanyBLL bll = new CompanyBLL()) { var q = bll.GetCompanyWithSpecifiedTime(startDate); if (q != null) { return q.Count() > 0 ? q.ToList() : null; } else { return null; } } }
public List<T_HR_COMPANY> GetCompanyActived(string userID) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<T_HR_COMPANY> ents = bll.GetCompanyActived(userID); // Tracer.Serializer(ents.ToList(), "ActivedCompany"); return ents.Count() > 0 ? ents.ToList() : null; } }
public void CompanyIndexUpdate(T_HR_COMPANY entity, ref string strMsg) { using (CompanyBLL bll = new CompanyBLL()) { bll.CompanyIndexUpdate(entity, ref strMsg); } }
public string GetOrgVersion() { using (CompanyBLL bll = new CompanyBLL()) { return bll.ReadVersion(); } }
public List<V_COMPANY> GetCompanyViewByDateAndUser(string startDate, string userID) { using (CompanyBLL bll = new CompanyBLL()) { IQueryable<V_COMPANY> ents = bll.GetCompanyViewByDateAndUser(startDate, userID); if (ents != null) { return ents.Count() > 0 ? ents.ToList() : null; } else { return null; } } }