Exemplo n.º 1
0
 private void FrmSKULocation_Load(object sender, EventArgs e)
 {
     try
     {
         SODal soDal = new SODal();
         gridControl1.DataSource = GetSKULocation(this.SkuCode);
     }
     catch (Exception ex)
     {
         MsgBox.Err(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void OnFrmLoad(object sender, EventArgs e)
 {
     try
     {
         this.soDal       = new SODal();
         this.vehicleDal  = new VehicleDal();
         dtBegin.DateTime = DateTime.Now.AddDays(-1);
         dtEnd.DateTime   = DateTime.Now;
         LoadDataAndBindGrid();
     }
     catch (Exception ex)
     {
         MsgBox.Err(ex.Message);
     }
 }
Exemplo n.º 3
0
        private void OnFrmLoad(object sender, EventArgs e)
        {
            try
            {
                this.soDal       = new SODal();
                this.soWeightDal = new SOWeightDal();
                this.vehicleDal  = new VehicleDal();
                txtBoxForContainerCode.Focus();

                if (!string.IsNullOrEmpty(Properties.Settings.Default.COMWeightNo))
                {
                    comboBoxEditCom.Text = Properties.Settings.Default.COMWeightNo;
                    TryOpenCom();    //尝试打开串口
                }

                #region 测试 报警灯

                /*
                 * try
                 * {
                 *  if (!serialPort2.IsOpen)
                 *  {
                 *      serialPort2.PortName = "COM3";
                 *      serialPort2.BaudRate = 9600;
                 *      serialPort2.Open();
                 *
                 *      lblComState.Text += "报警灯串口打开成功;";
                 *      timer1.Enabled = true;
                 *      this.txtBox.Focus();
                 *  }
                 * }
                 * catch (Exception ex)
                 * {
                 *  lblMsg.Show("报警灯:" + ex.Message, false);
                 * }
                 */
                #endregion

                LoadDataAndBindGrid();    //绑定车辆信息
            }
            catch (Exception ex)
            {
                MsgBox.Err(ex.Message);
            }
        }
Exemplo n.º 4
0
        private void OnFrmLoad(object sender, EventArgs e)
        {
            this.soDal = new SODal();
            txtBox.Focus();

#if !DEBUG
            //simpleButton1.Visible = false;
#else
            listComs.Text         = "100.00";
            lblCurrentWright.Text = listComs.Text;

            listComs.TextChanged += new EventHandler(simpleButton1_Click);
#endif

            if (!string.IsNullOrEmpty(Properties.Settings.Default.COMWeightNo))
            {
                listComs.Text = Properties.Settings.Default.COMWeightNo;
                TryOpenCom();
            }
        }
Exemplo n.º 5
0
 private void FrmCreateCRNBill_Load(object sender, EventArgs e)
 {
     try
     {
         soDal     = new SODal();
         unitDal   = new UnitDal();
         returnDal = new ReturnDal();
         dateReturnDate.DateTime = DateTime.Now;
         //获取选中销售单的明细
         GetSoDetails();
         BindiReturnReason();
         GetVehicleInfo();
         txtHandingPerson.Text = GlobeSettings.LoginedUser.UserName;
     }
     catch (Exception ex)
     {
         MsgBox.Warn(ex.Message);
         return;
     }
 }
Exemplo n.º 6
0
        private void RestoreFocusedBill()
        {
            DeletedSOHeaderEntity soHeaderEntity = SelectHeader;

            if (soHeaderEntity == null)
            {
                MsgBox.Warn("请选中要还原的单据。");
                return;
            }

            if (MsgBox.AskOK(string.Format("确认要还原单据“{0}”吗?", soHeaderEntity.BillNO)) != DialogResult.OK)
            {
                return;
            }

            try
            {
                //先看单据编号是否已存在
                SOHeaderEntity header = new SODal().GetHeaderInfoByBillNO(soHeaderEntity.BillNO, GlobeSettings.LoginedUser.WarehouseCode);
                if (header != null)
                {
                    MsgBox.Warn("单据编号已存在,无法还原。");
                }
                else
                {
                    soDal.RestoreBill(soHeaderEntity.BillID, soHeaderEntity.BillNO);
                    gvHeader.DeleteSelectedRows();
                    bindingSource1.ResetBindings(false);
                    ShowFocusedBillDetail();
                    MsgBox.OK("还原成功。");
                }
            }
            catch (Exception ex)
            {
                MsgBox.Err(ex.Message);
            }
        }
Exemplo n.º 7
0
 public FrmConfirmAmount(SOHeaderEntity header)
 {
     InitializeComponent();
     soDal        = new SODal();
     headerEntity = header;
 }
Exemplo n.º 8
0
 public FrmSODetails(int billID)
 {
     InitializeComponent();
     BillID = billID;
     soDal  = new SODal();
 }