private void InitSelectedEmployee(string Params) { if (!String.IsNullOrEmpty(Params)) { string[] peoples = Params.Split(new String[] { "," }, StringSplitOptions.RemoveEmptyEntries); foreach (string userId in peoples) { string name = (string)XSql.GetValue("SELECT RealName FROM TU_Employees WHERE UserID='" + userId + "'"); ListItem item = new ListItem(name, userId); this.lbRight.Items.Add(item); } } }
private string GetFlowName(int flowId) { string name = string.Empty; if (flowId == 0) { return("全部流程"); } else { return((string)XSql.GetValue("SELECT Name FROM Fl_Flows Where Id=" + flowId)); } }
private string GetUserString(string userString) { string str = string.Empty; Guid result; if (string.IsNullOrEmpty(userString)) { str = ""; } else if (ULCode.Validation.IsNumber(userString)) { str = (string)XSql.GetValue("SELECT CompanyName FROM Ass_Suppliers WHERE SupplierID=" + userString); } else if (Guid.TryParse(userString, out result)) { str = CommonUtils.GetRealNameListByUserIdList(userString); } return(str); }
private string GetUserString(string departmentId, string userString) { string userInfo = string.Empty; Guid result; if (string.IsNullOrEmpty(userString)) { userInfo = ""; } else if (ULCode.Validation.IsNumber(userString)) { userInfo = "供应商:" + (string)XSql.GetValue("SELECT CompanyName FROM Ass_Suppliers WHERE SupplierID=" + userString); } else if (Guid.TryParse(userString, out result)) { userInfo = CommonUtils.GetDeptNameListByDeptIdList(departmentId.ToString()) + " " + CommonUtils.GetRealNameListByUserIdList(userString); } return(userInfo); }
public static void AddLog(int logTypeID, string title, string parameters) { string tableName = (string)XSql.GetValue("SELECT TableName FROM TL_LogType WHERE ID=" + logTypeID); string param = parameters; string userId = Authentication.GetUserID(); if (string.IsNullOrEmpty(param)) { param = "NULL"; } else { param = String.Format("'{0}'", param); } if (!string.IsNullOrEmpty(tableName)) { string cmdText = String.Format("INSERT INTO " + tableName + " (Title,UserID,LogType,LogTime,LogIP,LogParaments) VALUES ('{0}','{1}',{2},'{3}','{4}',{5})", title, userId, logTypeID, DateTime.Now, HttpContext.Current.Request.UserHostAddress, param); XSql.Execute(cmdText); } }
private void InitData() { WX.CRM.Customer.MODEL customer = WX.CRM.Customer.NewDataModel(); string customerId = (string)XSql.GetValue("SELECT TOP 1 CustomerID FROM CRM_Customers ORDER BY ID DESC"); this.txtCustomerID.Text = customer.CreateCustomerID(customerId); WX.Data.Dict.BindListCtrl_InnerCategory(this.ddlCustomerCategory, null, "#--请选择客户内部类型--", null); WX.Data.Dict.BindListCtrl_CompanyNature(this.ddlCompanyNature, null, "#--请选择客户性质--", null); WX.Data.Dict.BindListCtrl_Source(this.ddlSource, null, "#--请选择客户来源--", null); WX.Data.Dict.BindListCtrl_Industry(this.ddlIndustry, null, "#--请选择客户行业--", null); var province = XSql.GetDataTable("SELECT code,name FROM CRM_Province"); this.ddlProvince.DataSource = province; this.ddlProvince.DataTextField = "name"; this.ddlProvince.DataValueField = "code"; this.ddlProvince.DataBind(); this.ddlProvince.Items.Insert(0, new ListItem("--请选择--", "0")); }
private string GetCategoryByID(string categoryId) { return((string)XSql.GetValue("SELECT Name FROM Ass_Category WHERE ID=" + categoryId)); }
private string GetSupplierByID(string supplierId) { return((string)XSql.GetValue("SELECT CompanyName FROM Ass_Suppliers WHERE SupplierID=" + supplierId)); }
public string GetProductNameByProductID(string ProductID) { return(XSql.GetValue("SELECT ProductName FROM Ass_Warehouse WHERE ProductID='" + ProductID + "'").ToString()); }