/// <summary> /// 获取签名图片 /// </summary> /// <param name="LoginName"></param> /// <returns></returns> public byte[] GetSignImg(string LoginName) { byte[] result = { }; DataSet ds = hdDbCmdManager.QueryForDataSet("SELECT SignPhoto FROM ERP_Identity.Auth.Gpuser WHERE LoginName = @LoginName AND StatId = 1", CommandType.Text, new CmdParameter[] { new CmdParameter("@LoginName", LoginName) }); if (ds != null && ds.Tables[0].Rows.Count > 0) { result = (byte[])(ds.Tables[0].Rows[0][0]); } return(result); }
//public XMBProjectInfo Delete(XMBProjectInfo entity, string operationBy) //{ // hdDbCmdManager.ExecuteTran((tran) => // { // InnerDelete(tran, entity, operationBy); // }); // return entity; //} public int GetMaxNumber() { DataSet ds = hdDbCmdManager.QueryForDataSet(@"SELECT MAX(PeriodsNumber) as PeriodsNumber FROM [ERP_Project].[Project].[Project] ", System.Data.CommandType.Text, null); if (ds.Tables[0].Rows.Count > 0) { if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["PeriodsNumber"].ToString())) { return(int.Parse(ds.Tables[0].Rows[0]["PeriodsNumber"].ToString()) + 1); } else { return(1); } } else { return(1); } }