public static void SaveModuleSofte(bool t) { if (t == false) { string strSql = "select id from M_Soid where Msoid=@Msoid "; SqlParameter p1 = new SqlParameter("@Msoid", T_addModule.T_id); int count = Convert.ToInt32(SQLHelper.ExecScalar(strSql, p1)); strSql = "Psoftid"; SqlParameter[] p = new SqlParameter[6]; p[0] = new SqlParameter("@Msoid", T_addModule.T_id); p[1] = new SqlParameter("@Msosn", T_addModule.T_sn); p[2] = new SqlParameter("@Msotm", T_addModule.T_time); if (count > 0) { p[3] = new SqlParameter("@id", 2); } else { p[3] = new SqlParameter("@id", 1); } p[4] = new SqlParameter("@userid", T_User.UserId); p[5] = new SqlParameter("@Mwtime", DESEncrypt.DesEncrypt(T_addModule.T_timecs)); SQLHelper.ExecuteNonQuery(strSql, CommandType.StoredProcedure, p); } else { string strSql = "update M_Soid set Msotm=@time "; SqlParameter p1 = new SqlParameter("@time", T_addModule.T_time); SQLHelper.ExecScalar(strSql, p1); } Common.Writelog(0, "修改软件授权时间" + T_addModule.T_time); }
public static void SaveModule() { string strSql = "select id from M_Moudule where ModuleChName=@ModuleChName"; SqlParameter p1 = new SqlParameter("@ModuleChName", T_addModule.T_moduleChName); int count = Convert.ToInt32(SQLHelper.ExecScalar(strSql, p1)); strSql = "PInserModule"; SqlParameter[] p = new SqlParameter[8]; p[0] = new SqlParameter("@userid", T_User.UserId); p[1] = new SqlParameter("@ModuleName", DESEncrypt.DesEncrypt(T_addModule.T_moduleName)); p[2] = new SqlParameter("@ModuleChName", T_addModule.T_moduleChName); p[3] = new SqlParameter("@ModuleInt", T_addModule.T_moduleInt); p[4] = new SqlParameter("@ModuleImgIdx", T_addModule.T_moduleImgIdx); p[5] = new SqlParameter("@ModuleFileName", DESEncrypt.DesEncrypt(T_addModule.T_moduleFileName)); p[6] = new SqlParameter("@id", count); if (count > 0) { p[7] = new SqlParameter("@stat", 2); } else { p[7] = new SqlParameter("@stat", 1); } SQLHelper.ExecuteNonQuery(strSql, CommandType.StoredProcedure, p); Common.Writelog(0, "增加模块:" + T_addModule.T_moduleChName); }
public static void DelModuelSys(string name) { string strSql = "delete from M_Moudule where ModuleChName=@name"; SqlParameter p1 = new SqlParameter("@name", name); SQLHelper.ExecScalar(strSql, p1); Common.Writelog(0, "永久禁用模块" + name); }
public static void DelMenuSet(int id, string name) { string strSql = "delete from M_MouduleMain where id=@id"; SqlParameter p1 = new SqlParameter("@id", id); SQLHelper.ExecScalar(strSql, p1); Common.Writelog(0, "删除菜单:" + name); }
public static void SaveMenuset(string id, string name, string xh) { string strSql = "PupdateMenuset"; SqlParameter[] p = new SqlParameter[3]; p[0] = new SqlParameter("@id", id); p[1] = new SqlParameter("@name", name); p[2] = new SqlParameter("@xh", xh); SQLHelper.ExecuteNonQuery(strSql, CommandType.StoredProcedure, p); Common.Writelog(0, "修改菜单:" + name); }
public static void UpdateModuelSys(string name, bool sys) { string strSql = ""; if (sys) { strSql = "update M_Moudule set ModuleSys=1 where ModuleChName=@name"; } else { strSql = "update M_Moudule set ModuleSys=null where ModuleChName=@name"; } SqlParameter p1 = new SqlParameter("@name", name); SQLHelper.ExecScalar(strSql, p1); Common.Writelog(0, "对模块" + name + "进行" + sys.ToString()); }