コード例 #1
0
ファイル: RaidStoreBLL.cs プロジェクト: XiaoQiJun/BPS
        public virtual RaidStoreDomain CreateRaidStoreDomain()
        {
            RaidStoreEntity entity = new RaidStoreEntity();
            entity.RaidStoreId = Guid.NewGuid().ToString();

            return new RaidStoreDomain(entity);
        }
コード例 #2
0
ファイル: RaidStoreDomain.cs プロジェクト: XiaoQiJun/BPS
 public RaidStoreDomain(RaidStoreEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }
コード例 #3
0
ファイル: RaidStoreBLL.cs プロジェクト: XiaoQiJun/BPS
 public virtual void UpdateRaidStoreEntity(RaidStoreEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
コード例 #4
0
ファイル: RaidStoreBLL.cs プロジェクト: XiaoQiJun/BPS
 public virtual void InsertRaidStoreEntity(RaidStoreEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }
コード例 #5
0
ファイル: Store.aspx.cs プロジェクト: XiaoQiJun/BPS
        /// <summary>
        /// 保存关闭弹出框

        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave2_Click(object sender, EventArgs e)
        {
            DataSet ds = MainService.NormalRaidBLLService.QueryByCondition<StoreEntity>(
                          BPSC.Common.Utils.QueryCondition.Create()
                          .Equals(StoreTable.C_StoreName, txtStoreName.Text.Trim())
                //.Equals(StoreTable.C_IsApprove,"1")   以后用到
                          .Order(StoreTable.C_DMS_ID));
            RaidStoreEntity entity = new RaidStoreEntity();
            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    entity.StoreId = ds.Tables[0].Rows[0][StoreTable.C_Sotre_ID].ToString();
                    entity.StoreName = ds.Tables[0].Rows[0][StoreTable.C_StoreName].ToString();
                    entity.DmsId = ds.Tables[0].Rows[0][StoreTable.C_DMS_ID].ToString();
                }
            }

            if (StoreData == null)
            {
                DataTable table = new DataTable();
                DataColumn column = new DataColumn(RaidStoreTable.C_Raid_Store_ID, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_Store_ID, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_DMS_ID, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_Store_Name, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_Action_NO, typeof(string));
                table.Columns.Add(column);
                StoreData.Tables.Add(table);
            }
            if (!string.IsNullOrEmpty(entity.StoreId))
            {
                DataRow row = StoreData.Tables[0].NewRow();
                row[RaidStoreTable.C_Action_NO] = NormalRaidID;
                row[RaidStoreTable.C_Raid_Store_ID] = Guid.NewGuid().ToString();
                row[RaidStoreTable.C_Store_ID] = entity.StoreId;
                row[RaidStoreTable.C_DMS_ID] = entity.DmsId;
                row[RaidStoreTable.C_Store_Name] = txtStoreName.Text.Trim();
                StoreData.Tables[0].Rows.Add(row);
            }
            else
            {
                DataRow row = StoreData.Tables[0].NewRow();
                row[RaidStoreTable.C_Action_NO] = NormalRaidID;
                row[RaidStoreTable.C_Raid_Store_ID] = Guid.NewGuid().ToString();
                row[RaidStoreTable.C_Store_ID] = "";
                row[RaidStoreTable.C_DMS_ID] = "";
                row[RaidStoreTable.C_Store_Name] = txtStoreName.Text.Trim();
                StoreData.Tables[0].Rows.Add(row);
            }

            txtStoreName.Text = "";
            btnSearch_Click(null, null);
        }
コード例 #6
0
ファイル: Store.aspx.cs プロジェクト: XiaoQiJun/BPS
        /// <summary>
        /// 保存关闭弹出框

        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave2_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtStoreName.Text.Trim()))
            {
                AlertMessage("StoreName is empty!");
                return;
            }
            DataSet ds = MainService.NormalRaidBLLService.QueryByCondition<StoreEntity>(
                          BPSC.Common.Utils.QueryCondition.Create()
                          .Equals(StoreTable.C_STORE_NAME, txtStoreName.Text.Trim())
                          .Equals(StoreTable.C_CITY, StoreCity)
                          .Equals(StoreTable.C_IS_DELETED, "N")
                          .Equals(StoreTable.C_STORE_TYPE, "Import")
                //.Equals(StoreTable.C_IsApprove,"1")   以后用到
                          .Order(StoreTable.C_DMS_ID));
            RaidStoreEntity entity = new RaidStoreEntity();
            if (ds != null && ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    entity.StoreId = ds.Tables[0].Rows[0][StoreTable.C_DMS_STORE_ID].ToString();
                    entity.StoreName = ds.Tables[0].Rows[0][StoreTable.C_STORE_NAME].ToString();
                    entity.DmsId = ds.Tables[0].Rows[0][StoreTable.C_DMS_ID].ToString();
                }
            }
            else
            {
                 ds = MainService.NormalRaidBLLService.QueryByCondition<StoreEntity>(
                         BPSC.Common.Utils.QueryCondition.Create()
                         .Equals(StoreTable.C_STORE_NAME, txtStoreName.Text.Trim())
                         .Equals(StoreTable.C_CITY, StoreCity)
                         .Equals(StoreTable.C_IS_DELETED, "N")
                         .Equals(StoreTable.C_STORE_TYPE, "Import")
                    //.Equals(StoreTable.C_IsApprove,"1")   以后用到
                         .Order(StoreTable.C_DMS_ID));
                 entity = new RaidStoreEntity();
                if (ds != null && ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        entity.StoreId = ds.Tables[0].Rows[0][StoreTable.C_DMS_STORE_ID].ToString();
                        entity.StoreName = ds.Tables[0].Rows[0][StoreTable.C_STORE_NAME].ToString();
                        entity.DmsId = ds.Tables[0].Rows[0][StoreTable.C_DMS_ID].ToString();
                    }
                }
            }

            if (StoreData == null || StoreData.Tables.Count == 0)
            {
                DataTable table = new DataTable();
                DataColumn column = new DataColumn(RaidStoreTable.C_Raid_Store_ID, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_Store_ID, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_DMS_ID, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_Store_Name, typeof(string));
                table.Columns.Add(column);
                column = new DataColumn(RaidStoreTable.C_Action_NO, typeof(string));
                table.Columns.Add(column);
                try
                {
                    StoreData.Tables.Add(table);
                }
                catch (Exception ex)
                {
                    AlertMessage(ex.Message);
                }
            }
            if (!string.IsNullOrEmpty(entity.StoreId))
            {
                DataRow row = StoreData.Tables[0].NewRow();
                row[RaidStoreTable.C_Action_NO] = NormalRaidID;
                row[RaidStoreTable.C_Raid_Store_ID] = Guid.NewGuid().ToString();
                row[RaidStoreTable.C_Store_ID] = entity.StoreId;
                row[RaidStoreTable.C_DMS_ID] = entity.DmsId;
                row[RaidStoreTable.C_Store_Name] = txtStoreName.Text.Trim();
                StoreData.Tables[0].Rows.Add(row);
            }
            else
            {
                DataRow row = StoreData.Tables[0].NewRow();
                row[RaidStoreTable.C_Action_NO] = NormalRaidID;
                row[RaidStoreTable.C_Raid_Store_ID] = Guid.NewGuid().ToString();
                row[RaidStoreTable.C_Store_ID] = "";
                row[RaidStoreTable.C_DMS_ID] = "";
                row[RaidStoreTable.C_Store_Name] = txtStoreName.Text.Trim();
                StoreData.Tables[0].Rows.Add(row);
            }

            txtStoreName.Text = "";
            btnSearch_Click(null, null);
        }