コード例 #1
0
        private CuCustomerEntity PrepareFormData()
        {
            //TODO:需要校验参数的合法性
            txtCuId.Text.InitValidation("编号").NotEmpty().ShorterThan(25);
            txtCuName.Text.InitValidation("姓名").NotEmpty().ShorterThan(25);
            txtDistrict.Text.InitValidation("地区").NotEmpty().ShorterThan(25);
            txtAddress.Text.InitValidation("地址").ShorterThan(250);
            txtRemark.Text.InitValidation("备注").ShorterThan(1000);

            var entity = new CuCustomerEntity();
            entity.CuId = txtCuId.Text;
            entity.CuName = txtCuName.Text;
            entity.District = txtDistrict.Text;
            entity.Address = txtAddress.Text;
            entity.Remark = txtRemark.Text;
            entity.ActivityFlag = rEnabled.Checked;
            return entity;
        }
コード例 #2
0
ファイル: CuCustomerBiz.cs プロジェクト: yuzhaocai/stonefw
 public void AddNewCuCustomer(CuCustomerEntity entity)
 {
     entity.DeleteFlag = false;
     entity.Insert();
 }
コード例 #3
0
ファイル: CuCustomerBiz.cs プロジェクト: yuzhaocai/stonefw
 public void UpdateCuCustomer(CuCustomerEntity entity)
 {
     entity.Update();
 }
コード例 #4
0
ファイル: CuCustomerBiz.cs プロジェクト: yuzhaocai/stonefw
 public void DeleteCuCustomer(string cuId)
 {
     CuCustomerEntity entity = new CuCustomerEntity() {CuId = cuId, DeleteFlag = true};
     entity.Update();
 }