コード例 #1
0
        private void buttonCreateClassify_Click(object sender, EventArgs e)
        {
            string      classifyName   = textBoxClassifyName.Text;
            string      classifyDetail = textBoxClassifyDetail.Text;
            ClassifyDTO classify       = new ClassifyDTO();

            classify.ClassifyName   = classifyName;
            classify.ClassifyDetail = classifyDetail;
            service.createClassify(classify);
            loadClassifies();
        }
コード例 #2
0
        private void buttonEditClassify_Click(object sender, EventArgs e)
        {
            int         classifyId     = Convert.ToInt32(textBoxIdClassify.Text);
            string      classifyName   = textBoxClassifyName.Text;
            string      classifyDetail = textBoxClassifyDetail.Text;
            ClassifyDTO classify       = new ClassifyDTO();

            classify.Id             = classifyId;
            classify.ClassifyName   = classifyName;
            classify.ClassifyDetail = classifyDetail;
            service.editClassify(classify);
            loadClassifies();
        }
コード例 #3
0
        private void textBoxId_TextChanged(object sender, EventArgs e)
        {
            if (!textBoxId.Text.Equals("0") && !textBoxId.Text.Equals(""))
            {
                int         idProduct = Convert.ToInt32(textBoxId.Text);
                ClassifyDTO classify  = service.getClassifyByIdProduct(idProduct);

                int index = -1;
                int i     = 0;
                foreach (ClassifyDTO item in comboBoxClassify2.Items)
                {
                    if (item.Id == classify.Id)
                    {
                        index = i;
                        break;
                    }
                    i++;
                }
                comboBoxClassify2.SelectedIndex = index;
            }
        }
コード例 #4
0
 public void editClassify(ClassifyDTO classify)
 {
     classifyService.edit(classify);
 }
コード例 #5
0
 public void createClassify(ClassifyDTO classify)
 {
     classifyService.create(classify);
 }
コード例 #6
0
 public void edit(ClassifyDTO classify)
 {
     classifyRepository.edit(mapper.Map <ClassifyDTO, Classify>(classify));
 }
コード例 #7
0
 public void create(ClassifyDTO classify)
 {
     classifyRepository.create(mapper.Map <ClassifyDTO, Classify>(classify));
 }