Beispiel #1
0
        public static List <SqlParameter> Data2SqlParam(dynamic data, Models.MetaObject metaobject, string outputparaname, SqlParameter parameter)
        {
            List <SqlParameter> parameterlist = new List <SqlParameter>();

            outputparaname = string.Format("@{0}", outputparaname);

            foreach (var item in metaobject.MetaTable)
            {
                SqlParameter para = ExConvert.ParseSqlParam(data, item);
                if (outputparaname == para.ParameterName)
                {
                    //tạm thời sử dụng 1 output
                    para.Direction = ParameterDirection.Output;
                }
                parameterlist.Add(para);
            }
            if (parameter != null)
            {
                parameterlist.Add(parameter);
            }
            return(parameterlist);
        }
Beispiel #2
0
 public static string RelativeFormat(this DateTime value)
 {
     return(ExConvert.RelativeFormat(value));
 }
Beispiel #3
0
 public static string Price(this decimal value)
 {
     return(ExConvert.Price2String(value));
 }
Beispiel #4
0
 public static string Quantity(this decimal value)
 {
     return(ExConvert.Quantity2String(value));
 }
Beispiel #5
0
 public static string Currency(this decimal value)
 {
     return(ExConvert.Data2String(value, "Numeric", "c", "CICC"));
 }