コード例 #1
0
ファイル: AddOrderLookup.aspx.cs プロジェクト: davinx/himedi
 private OrderLookupListInfo GetOrderLookupList()
 {
     OrderLookupListInfo orderLookupListInfo = new OrderLookupListInfo();
     orderLookupListInfo.Name = txtListName.Text.Trim();
     orderLookupListInfo.SelectMode = dropSelectMode.SelectedValue;
     orderLookupListInfo.Description = txtDescription.Text.Trim();
     return orderLookupListInfo;
 }
コード例 #2
0
ファイル: AddOrderLookup.aspx.cs プロジェクト: davinx/himedi
 private bool ValidationOrderLookupList(OrderLookupListInfo lookupList)
 {
     ValidationResults results = Hishop.Components.Validation.Validation.Validate<OrderLookupListInfo>(lookupList, new string[] { "ValOrderLookupListInfo" });
     string msg = string.Empty;
     if (!results.IsValid)
     {
         foreach (ValidationResult result in (IEnumerable<ValidationResult>)results)
         {
             msg = msg + Formatter.FormatErrorMessage(result.Message);
         }
         ShowMsg(msg, false);
     }
     return results.IsValid;
 }
コード例 #3
0
ファイル: DataMapper.cs プロジェクト: davinx/himedi
 public static OrderLookupListInfo PopulateOrderLookupList(IDataRecord reader)
 {
     if (null == reader)
     {
         return null;
     }
     OrderLookupListInfo info = new OrderLookupListInfo();
     info.Name = (string) reader["Name"];
     info.LookupListId = (int) reader["LookupListId"];
     info.SelectMode = (SelectModeTypes) reader["SelectMode"];
     if (DBNull.Value != reader["Description"])
     {
         info.Description = (string) reader["Description"];
     }
     return info;
 }
コード例 #4
0
ファイル: OrderHelper.cs プロジェクト: davinx/himedi
 public static bool UpdateOrderLookupList(OrderLookupListInfo orderLookupList)
 {
     Globals.EntityCoding(orderLookupList, true);
     return SalesProvider.Instance().UpdateOrderLookupList(orderLookupList);
 }
コード例 #5
0
ファイル: SalesData.cs プロジェクト: davinx/himedi
 public override int AddOrderLookupList(OrderLookupListInfo orderLookupList)
 {
     DbCommand sqlStringCommand = database.GetSqlStringCommand("INSERT INTO Hishop_OrderLookupLists([Name],SelectMode,Description)VALUES(@Name,@SelectMode,@Description); SELECT @@IDENTITY");
     database.AddInParameter(sqlStringCommand, "Name", DbType.String, orderLookupList.Name);
     database.AddInParameter(sqlStringCommand, "SelectMode", DbType.Int32, orderLookupList.SelectMode);
     database.AddInParameter(sqlStringCommand, "Description", DbType.String, orderLookupList.Description);
     object ret = database.ExecuteScalar(sqlStringCommand);
     if (ret != null)
     {
         return Convert.ToInt32(ret);
     }
     return 0;
 }
コード例 #6
0
ファイル: SalesData.cs プロジェクト: davinx/himedi
 public override bool UpdateOrderLookupList(OrderLookupListInfo orderLookupList)
 {
     DbCommand sqlStringCommand = database.GetSqlStringCommand("UPDATE Hishop_OrderLookupLists Set [Name]= @Name,SelectMode = @SelectMode,Description = @Description WHERE LookupListId = @LookupListId");
     database.AddInParameter(sqlStringCommand, "Name", DbType.String, orderLookupList.Name);
     database.AddInParameter(sqlStringCommand, "SelectMode", DbType.Int32, orderLookupList.SelectMode);
     database.AddInParameter(sqlStringCommand, "Description", DbType.String, orderLookupList.Description);
     database.AddInParameter(sqlStringCommand, "LookupListId", DbType.Int32, orderLookupList.LookupListId);
     return (database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
コード例 #7
0
ファイル: SalesData.cs プロジェクト: davinx/himedi
 public override IList<OrderLookupListInfo> GetOrderLookupLists()
 {
     IList<OrderLookupListInfo> list = new List<OrderLookupListInfo>();
     DbCommand sqlStringCommand = database.GetSqlStringCommand("SELECT * FROM Hishop_OrderLookupLists");
     using (IDataReader reader = database.ExecuteReader(sqlStringCommand))
     {
         while (reader.Read())
         {
             OrderLookupListInfo item = new OrderLookupListInfo();
             item.Name = (string)reader["Name"];
             item.LookupListId = (int)reader["LookupListId"];
             item.SelectMode = (SelectModeTypes)reader["SelectMode"];
             if (DBNull.Value != reader["Description"])
             {
                 item.Description = (string)reader["Description"];
             }
             list.Add(item);
         }
     }
     return list;
 }
コード例 #8
0
ファイル: SalesProvider.cs プロジェクト: davinx/himedi
 public abstract int AddOrderLookupList(OrderLookupListInfo orderLookupList);
コード例 #9
0
ファイル: SalesProvider.cs プロジェクト: davinx/himedi
 public abstract bool UpdateOrderLookupList(OrderLookupListInfo orderLookupList);