コード例 #1
0
        /// <summary>
        /// 主表保存
        /// </summary>
        /// <returns></returns>
        public string MAINEdit()
        {
            string _IB_ID = tbxIB_ID.Text;

            try
            {
                var    model    = new IN_BACK00(x => x.IB_ID == _IB_ID);
                var    OlUser   = OnlineUsersBll.GetInstence().GetModelForCache(x => x.UserHashKey == Session[OnlineUsersTable.UserHashKey].ToString());
                string _SHOP_ID = ddlSHOP_NAME.SelectedValue;
                if (String.IsNullOrEmpty(_IB_ID))
                {
                    model.SetIsNew(true);
                    model.CRT_DATETIME = DateTime.Now;
                    model.CRT_USER_ID  = OlUser.Manager_LoginName;
                    DataTable dt = new DataTable();
                    dt     = (DataTable)SPs.Get_ORDER_SEED(_SHOP_ID, "IN_BACK00").ExecuteDataTable();
                    _IB_ID = dt.Rows[0]["PLANE_ID"].ToString();
                    //var model = Purchase00.SingleOrDefault(x => x.Purchase_ID == _Pur00_id);
                    tbxIB_ID.Text = _IB_ID;
                }
                model.SHOP_ID    = _SHOP_ID;
                model.IB_ID      = _IB_ID.ToString();
                model.STATUS     = ConvertHelper.Cint(ddlStatus.SelectedValue);
                model.INPUT_DATE = ConvertHelper.StringToDatetime(dpINPUT_DATE.SelectedDate.ToString());

                model.OUT_SHOP     = ddlOUT_SHOP.SelectedValue;
                model.STOCK_ID     = ddlSTOCK_ID.SelectedValue;
                model.USER_ID      = OlUser.Manager_LoginName;
                model.APP_USER     = OlUser.Manager_LoginName;
                model.APP_DATETIME = tbxAPP_DATETIME.Text == "" ? DateTime.Parse("1900-01-01 00:00:00") : DateTime.Now;


                string _RELATE_ID = tbxRELATE_ID.Text;
                model.RELATE_ID = _RELATE_ID;
                if (!String.IsNullOrEmpty(_RELATE_ID))
                {
                    var modelOrder = new OUT_BACK00(x => x.BK_ID == _RELATE_ID);
                    modelOrder.Exported    = 1;
                    modelOrder.Exported_ID = _IB_ID;
                    modelOrder.Save();
                }
                model.Memo   = tbxMemo.Text;
                model.LOCKED = ConvertHelper.StringToByte(ckLOCKED.Checked ? "1" : "0");

                model.MOD_DATETIME = DateTime.Now;
                model.MOD_USER_ID  = OlUser.Manager_LoginName;
                model.LAST_UPDATE  = DateTime.Now;
                model.Trans_STATUS = 0;
                IN_BACK00Bll.GetInstence().Save(this, model);
            }
            catch (Exception err)
            {
                return(err.Message);
            }
            LoadMAIN(_IB_ID);
            return("");
        }
コード例 #2
0
 public void SearchOrder()
 {
     //int type = ConvertHelper.Cint(FilterDateRadio.SelectedValue);
     IN_BACK00Bll.GetInstence().BindGrid(Grid1, 0, 0, InquiryCondition(), sortList);
     //TAKEIN10Bll.GetInstence().BindOrderGrid(st, et, type, Grid1);
 }
コード例 #3
0
 /// <summary>
 /// 初始化
 /// </summary>
 public override void Init()
 {
     bll = IN_BACK00Bll.GetInstence();
     //throw new NotImplementedException();
 }