//编辑选择的往来的单位分类 protected void EditItem(object sender, EventArgs e) { if (TV_CompanyClass.SelectedNode != null) { RadTreeNode currentNode = TV_CompanyClass.SelectedNode; Guid companyClassId = new Guid(currentNode.Value); if (companyClassId != Guid.Empty) { NonceCompanyClass = _cost.GetCompanyClass(companyClassId); ControlPanel.Visible = false; IB_Add.Visible = false; LBAddSpace.Visible = false; IB_Update.Visible = true; LBUpdateSpace.Visible = true; IB_Cancel.Visible = true; TB_CompanyClassCode.ReadOnly = false; TB_CompanyClassName.ReadOnly = false; } else { RAM.Alert("根节点不允许编辑。"); } } else { RAM.Alert("您没有选择要编辑的往来单位分类!\n\n请从左边的往来单位分类树中选择要编辑的往来单位分类。"); } }
public string GetClass(object companyId) { if (new Guid(companyId.ToString()) == Guid.Empty) { return(string.Empty); } CostCussentInfo info = _costCussentDao.GetCompanyCussent(new Guid(companyId.ToString())); string className = info.CompanyId != Guid.Empty ? info.CompanyName : _costDao.GetCompanyClass(new Guid(companyId.ToString())).CompanyClassName; if (string.IsNullOrEmpty(className)) { className = string.Empty; } return(className); }
/// <summary> /// 费用分类 /// </summary> /// <param name="companyClassId">费用分类Id</param> /// <param name="companyId">具体类别Id</param> /// <returns></returns> /// zal 2015-11-13 public string GetCompanyName(Guid companyClassId, Guid companyId) { string companyName = string.Empty; if (!companyClassId.Equals(Guid.Empty)) { var costCompanyClassInfo = _costDao.GetCompanyClass(companyClassId); if (costCompanyClassInfo != null) { companyName = costCompanyClassInfo.CompanyClassName; if (!companyId.Equals(Guid.Empty)) { var costCussentInfo = _costCussent.GetCompanyCussent(companyId); if (costCussentInfo != null) { companyName += "-" + costCussentInfo.CompanyName; } } } } return(companyName); }