示例#1
0
        private void ShowInfo(int _id)
        {
            BLL.car_other_costbll    bll   = new BLL.car_other_costbll();
            Model.car_other_costinfo model = bll.GetModel(_id);

            txtCode.Text   = model.Code;
            txtTittle.Text = model.Tittle;
            ddlCar_Number.SelectedValue = model.Car.Car_Number;
            txtCost.Text = model.Cost.ToString();
            ddlType_Code.SelectedValue = model.Type_Code;
        }
        private void AfterStatus()
        {
            string strid     = StringTrim(Request.Form["id"]);
            int    id        = Convert.ToInt32(strid);
            string strstatus = StringTrim(Request.Form["status"]);

            ChkAdminLevel("users", DTEnums.ActionEnum.Delete.ToString()); //检查权限
            BLL.car_other_costbll          bll    = new BLL.car_other_costbll();
            DTcms.Model.car_other_costinfo record = bll.GetModel(id);
            int    iresult   = 0;
            string strupdate = "Status=1,Checker_Code='" + admin_info.user_name + "',Check_Time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss") + "'";

            iresult = bll.UpdateField(id, strupdate);
            ResultView view = new ResultView();

            view.putData("result", iresult);
            outResult(view);
        }
示例#3
0
        private bool DoEdit(int _id)
        {
            bool result = true;

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

            model.Code           = txtCode.Text.Trim();
            model.Tittle         = txtTittle.Text;
            model.Car            = new Model.carinfo();
            model.Car.Car_Number = ddlCar_Number.SelectedValue;
            string s = txtCost.Text;

            model.Cost      = decimal.Parse(s == "" ? "0" : s);
            model.Type_Code = ddlType_Code.SelectedValue;

            if (!bll.Update(model))
            {
                result = false;
            }
            return(result);
        }