public int Register(string _ParentId, string _UserName, string _Password, decimal _Point) { int result; using (DbOperHandler dbOperHandler = new ComData().Doh()) { string text = MD5.Last64(_Password); object[,] array = new object[2, 5]; array[0, 0] = "ParentId"; array[0, 1] = "UserName"; array[0, 2] = "Password"; array[0, 3] = "Point"; array[0, 4] = "PayPass"; array[1, 0] = _ParentId; array[1, 1] = _UserName; array[1, 2] = text; array[1, 3] = _Point; array[1, 4] = MD5.Last64(MD5.Lower32("123456")); object[,] vFields = array; dbOperHandler.Reset(); dbOperHandler.AddFieldItems(vFields); int num = dbOperHandler.Insert("N_User"); object[,] array2 = new object[2, 2]; array2[0, 0] = "UserId"; array2[0, 1] = "Change"; array2[1, 0] = num; array2[1, 1] = 0; object[,] vFields2 = array2; dbOperHandler.Reset(); dbOperHandler.AddFieldItems(vFields2); dbOperHandler.Insert("N_UserMoneyStatAll"); result = num; } return(result); }
public int Register(string _ParentId, string _UserName, string _Password, Decimal _Point, string merchantId) { using (DbOperHandler dbOperHandler = new ComData().Doh()) { string str = MD5.Last64(_Password); object[,] _vFields1 = new object[2, 6] { { (object)"MerchantId", (object)"ParentId", (object)"UserName", (object)"Password", (object)"Point", (object)"PayPass" }, { (object)merchantId, (object)_ParentId, (object)_UserName, (object)str, (object)_Point, (object)MD5.Last64(MD5.Lower32("123456")) } }; dbOperHandler.Reset(); dbOperHandler.AddFieldItems(_vFields1); int num = dbOperHandler.Insert("N_User"); object[,] _vFields2 = new object[2, 2] { { (object)"UserId", (object)"Change" }, { (object)num, (object)0 } }; dbOperHandler.Reset(); dbOperHandler.AddFieldItems(_vFields2); dbOperHandler.Insert("N_UserMoneyStatAll"); return(num); } }