示例#1
0
        protected void AddImages(FishEntity.OutboundOrderEntity fish)
        {
            if (fish == null)
            {
                return;
            }

            FishBll.Bll.ImageBll bll = new FishBll.Bll.ImageBll();

            if (fish.id > 0)
            {
                bll.DeleteByRecordIdAndType(fish.id, (int)FishEntity.ImageTypeEnum.CHUKUDAN);
            }

            List <FishEntity.ImageEntity> images = GetCKDImages();

            images = GetCKDImages();
            if (images != null)
            {
                foreach (FishEntity.ImageEntity item in images)
                {
                    item.recordid   = fish.id;
                    item.createman  = FishEntity.Variable.User.username;
                    item.createtime = DateTime.Now;
                    item.remark     = this.Name;
                    item.title      = "出库单";
                    bll.Add(item);
                }
            }
        }
示例#2
0
        void QueryOne(string operate, string orderBy)
        {
            string whereEx = string.Empty;

            if (string.IsNullOrEmpty(strWhere))
            {
                whereEx = "1=1";
            }
            else
            {
                whereEx = strWhere;
            }
            if (_model != null)
            {
                whereEx = whereEx + " AND code " + operate + orderBy;
            }

            _model = _bll.GetModel(whereEx);
            if (_model == null)
            {
                MessageBox.Show("已经没有记录了");
                return;
            }
            setValue();
        }
示例#3
0
        private void txtunit_DoubleClick(object sender, EventArgs e)
        {
            FormCompanyList form = new FormCompanyList();

            if (form.ShowDialog() == DialogResult.OK)
            {
                PurchaseApplicationEntity _model = new PurchaseApplicationEntity();
                _model       = form.getModel;
                txtunit.Text = _model.buyer;
            }
        }
示例#4
0
        public FormOutboundOrder(string name)
        {
            InitializeComponent();
            getname = name;
            _model  = new FishEntity.OutboundOrderEntity();
            _bll    = new FishBll.Bll.OutboundOrderBll();

            InitDataUtil.BindComboBoxData(txttype, FishEntity.Constant.FishClass, true);
            cmbCountry.SelectedValueChanged -= cmbCountry_SelectedValueChanged;
            InitDataUtil.BindComboBoxData(cmbCountry, FishEntity.Constant.CountryType, true);
            cmbCountry.SelectedValueChanged += cmbCountry_SelectedValueChanged;
            InitDataUtil.BindComboBoxData(cmbBrands, FishEntity.Constant.Brand, true);
            BindCountryBrandData();
        }
示例#5
0
 private void FormOutboundOrder_Load(object sender, EventArgs e)
 {
     MenuCode = "M455"; ControlButtomRoles();
     if (Megres.oddNum != null && Megres.oddNum.ToString() != "")
     {
         _model = _bll.GetModel("code='" + Megres.oddNum + "' ");
         if (_model == null)
         {
             MessageBox.Show("没有记录了");
         }
         else
         {
             setValue();
         }
         Megres.oddNum = string.Empty;
     }
 }
示例#6
0
        public override int Query()
        {
            FormOutboundOrderQuery form = new FormOutboundOrderQuery(this.Text + "查询");

            if (form.ShowDialog() == DialogResult.OK)
            {
                strWhere = form.getWhere;
                _model   = _bll.GetModel(strWhere);
                if (_model == null)
                {
                    MessageBox.Show("没有记录了");
                    return(0);
                }
                setValue();
            }

            return(base.Query());
        }
示例#7
0
        bool getValue()
        {
            errorProvider1.Clear();
            result                 = true;
            _model                 = new OutboundOrderEntity();
            _model.id              = recordid_1;
            _model.code            = txtcode.Text;
            _model.codeNum         = txtcodeNum.Text;
            _model.codeNumContract = txtcodeNumContract.Text;
            if (string.IsNullOrEmpty(txtseNumber.Text))
            {
                errorProvider1.SetError(txtseNumber, "必填");
                result = false;
            }
            _model.codeNumContract = txtcodeNumContract.Text;
            if (string.IsNullOrEmpty(txtunit.Text))
            {
                errorProvider1.SetError(txtunit, "必填");
                result = false;
            }
            _model.seNumber = txtseNumber.Text;
            _model.unit     = txtunit.Text;
            if (string.IsNullOrEmpty(txttype.Text))
            {
                errorProvider1.SetError(txttype, "必填");
                result = false;
            }
            _model.type = txttype.Text;
            if (string.IsNullOrEmpty(cmbCountry.Text))
            {
                errorProvider1.SetError(cmbCountry, "必填");
                result = false;
            }
            _model.Country = cmbCountry.Text;
            if (string.IsNullOrEmpty(cmbBrands.Text))
            {
                errorProvider1.SetError(cmbBrands, "必填");
                result = false;
            }
            _model.Brands     = cmbBrands.Text;
            _model.FishMealId = txtFishMealId.Text;
            if (string.IsNullOrEmpty(txtshipName.Text))
            {
                errorProvider1.SetError(txtshipName, "必填");
                result = false;
            }
            _model.shipName = txtshipName.Text;
            decimal outResult = 0M;

            if (string.IsNullOrEmpty(txtweight.Text) && decimal.TryParse(txtweight.Text, out outResult) == false)
            {
                errorProvider1.SetError(txtweight, "请重新输入");
                result = false;
            }

            _model.weight = outResult;
            if (string.IsNullOrEmpty(txtpileNum.Text))
            {
                errorProvider1.SetError(txtpileNum, "必填");
                result = false;
            }
            _model.pileNum = txtpileNum.Text;
            _model.date    = txtdate.Value;
            if (string.IsNullOrEmpty(txtwaseHouse.Text))
            {
                errorProvider1.SetError(txtwaseHouse, "必填");
                result = false;
            }
            _model.waseHouse = txtwaseHouse.Text;
            if (string.IsNullOrEmpty(txtspeci.Text))
            {
                errorProvider1.SetError(txtspeci, "必填");
                result = false;
            }
            _model.speci = txtspeci.Text;
            if (string.IsNullOrEmpty(txtbillName.Text))
            {
                errorProvider1.SetError(txtbillName, "必填");
                result = false;
            }
            _model.billName = txtbillName.Text;
            int outRe = 0;

            if (string.IsNullOrEmpty(txtpageNum.Text) && int.TryParse(txtpageNum.Text, out outRe) == false)
            {
                errorProvider1.SetError(txtpageNum, "请重新输入");
                result = false;
            }
            _model.pageNum = outRe;
            if (string.IsNullOrEmpty(txtremark.Text))
            {
                errorProvider1.SetError(txtremark, "必填");
                result = false;
            }
            _model.remark = txtremark.Text;
            _model.notice = txtnotice.Text;
            outResult     = 0M;
            if (string.IsNullOrEmpty(txtware.Text) && decimal.TryParse(txtware.Text, out outResult) == false)
            {
                errorProvider1.SetError(txtware, "请重新输入");
                result = false;
            }
            _model.ware    = outResult;
            _model.receive = txtreceive.Text;

            return(result);
        }