Example #1
0
        private void ShowInfo(int _id)
        {
            BLL.Haulway   bll   = new BLL.Haulway();
            Model.Haulway model = bll.GetModel(_id);

            txtName.Text = model.Name;
            txtCode.Text = model.Code;
            txtLoadingCapacityRunning.Text   = model.LoadingCapacityRunning.ToString();
            txtNoLoadingCapacityRunning.Text = model.NoLoadingCapacityRunning.ToString();
        }
Example #2
0
 protected void ddlHaulway_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(ddlHaulway.SelectedValue))
     {
         BLL.Haulway   haulwayBll = new BLL.Haulway();
         Model.Haulway haulway    = haulwayBll.GetModel(Convert.ToInt32(ddlHaulway.SelectedValue));
         if (haulway != null)
         {
             txtLoadingCapacityRunning.Text   = haulway.LoadingCapacityRunning.ToString();
             txtNoLoadingCapacityRunning.Text = haulway.NoLoadingCapacityRunning.ToString();
         }
     }
 }
Example #3
0
 protected void ddlHaulway_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(ddlHaulway.SelectedValue))
     {
         BLL.Haulway haulwayBll = new BLL.Haulway();
         Model.Haulway haulway = haulwayBll.GetModel(Convert.ToInt32(ddlHaulway.SelectedValue));
         if (haulway != null)
         {
             txtLoadingCapacityRunning.Text = haulway.LoadingCapacityRunning.ToString();
             txtNoLoadingCapacityRunning.Text = haulway.NoLoadingCapacityRunning.ToString();
         }
     }
 }
Example #4
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.Haulway   bll   = new BLL.Haulway();
            Model.Haulway model = bll.GetModel(_id);

            model.Name = txtName.Text.Trim();
            model.Code = string.IsNullOrEmpty(txtCode.Text.Trim()) ? model.Name : txtCode.Text.Trim();
            model.LoadingCapacityRunning   = Utils.StrToDecimal(txtLoadingCapacityRunning.Text.Trim(), 0.00M);
            model.NoLoadingCapacityRunning = Utils.StrToDecimal(txtNoLoadingCapacityRunning.Text.Trim(), 0.00M);

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改运输路线信息:" + model.Name); //记录日志
                result = true;
            }
            return(result);
        }
Example #5
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.Haulway bll = new BLL.Haulway();
            Model.Haulway model = bll.GetModel(_id);

            model.Name = txtName.Text.Trim();
            model.Code = string.IsNullOrEmpty(txtCode.Text.Trim()) ? model.Name : txtCode.Text.Trim();
            model.LoadingCapacityRunning = Utils.StrToDecimal(txtLoadingCapacityRunning.Text.Trim(), 0.00M);
            model.NoLoadingCapacityRunning = Utils.StrToDecimal(txtNoLoadingCapacityRunning.Text.Trim(), 0.00M);

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改运输路线信息:" + model.Name); //记录日志
                result = true;
            }
            return result;
        }
Example #6
0
        private void ShowInfo(int _id)
        {
            BLL.Haulway bll = new BLL.Haulway();
            Model.Haulway model = bll.GetModel(_id);

            txtName.Text = model.Name;
            txtCode.Text = model.Code;
            txtLoadingCapacityRunning.Text = model.LoadingCapacityRunning.ToString();
            txtNoLoadingCapacityRunning.Text = model.NoLoadingCapacityRunning.ToString();
        }