181210 chi NR구매등록시 이미지 표시 및 추가 기능
NR구매목록에서 권한 없는 사람이 더블클릭으로 편집할 수 있는 버그 수정
This commit is contained in:
@@ -1,46 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class DBM
|
||||
{
|
||||
|
||||
public enum eAutoType
|
||||
{
|
||||
purchase,
|
||||
holyday
|
||||
}
|
||||
public static int getAuth(eAutoType type, string uid)
|
||||
{
|
||||
return getAuth(type.ToString(), uid);
|
||||
}
|
||||
public static int getAuth(eAutoType type)
|
||||
{
|
||||
return getAuth(type.ToString(), info.Login.no);
|
||||
}
|
||||
|
||||
|
||||
private static int getAuth(string field,string uid)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
int retval = 0;
|
||||
|
||||
string sql = string.Format("select isnull([{0}],0) from Auth where [user]= '{1}'",field,uid);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteScalar();
|
||||
if(rdr != null )
|
||||
retval = int.Parse(rdr.ToString());
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public static partial class DBM
|
||||
{
|
||||
|
||||
public enum eAutoType
|
||||
{
|
||||
purchase,
|
||||
holyday
|
||||
}
|
||||
public static int getAuth(eAutoType type, string uid)
|
||||
{
|
||||
return getAuth(type.ToString(), uid);
|
||||
}
|
||||
public static int getAuth(eAutoType type)
|
||||
{
|
||||
return getAuth(type.ToString(), info.Login.no);
|
||||
}
|
||||
|
||||
|
||||
private static int getAuth(string field,string uid)
|
||||
{
|
||||
var cn = getCn();
|
||||
cn.Open();
|
||||
|
||||
int retval = 0;
|
||||
|
||||
string sql = string.Format("select isnull([{0}],0) from Auth where [user]= '{1}'",field,uid);
|
||||
var cmd = new SqlCommand(sql, cn);
|
||||
var rdr = cmd.ExecuteScalar();
|
||||
if(rdr != null )
|
||||
retval = int.Parse(rdr.ToString());
|
||||
|
||||
cn.Close();
|
||||
cn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user