Esempio n. 1
0
        public virtual RaidStoreDomain CreateRaidStoreDomain()
        {
            RaidStoreEntity entity = new RaidStoreEntity();
            entity.RaidStoreId = Guid.NewGuid().ToString();

            return new RaidStoreDomain(entity);
        }
Esempio n. 2
0
 public RaidStoreDomain(RaidStoreEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }
Esempio n. 3
0
 public virtual void UpdateRaidStoreEntity(RaidStoreEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
Esempio n. 4
0
 public virtual void InsertRaidStoreEntity(RaidStoreEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }
Esempio n. 5
0
        /// <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);
        }
Esempio n. 6
0
        /// <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);
        }