public relative Insert_relative_select(int ID)
 {
     relative = relative.Select(ID);
     Insert_case_id_txt.Text            = Convert.ToString(relative.case_id);
     Insert_client_id_txt.Text          = Convert.ToString(relative.client_id);
     Insert_address_id_txt.Text         = Convert.ToString(relative.address_id);
     Insert_relative_help_memo_txt.Text = Convert.ToString(relative.relative_help_memo);
     Insert_will_help_txt.Text          = Convert.ToString(relative.will_help);
     return(relative);
 }
 public relative Insert_relative_select(int ID)
 {
     relative = relative.Select(ID);
     Insert_case_id_txt.Text = Convert.ToString(relative.case_id);
     Insert_client_id_txt.Text = Convert.ToString(relative.client_id);
     Insert_address_id_txt.Text = Convert.ToString(relative.address_id);
     Insert_relative_help_memo_txt.Text = Convert.ToString(relative.relative_help_memo);
     Insert_will_help_txt.Text = Convert.ToString(relative.will_help);
     return relative;
 }
 public relative relative_insert()
 {
     relative.case_id            = Convert.ToInt32(Insert_case_id_txt.Text);
     relative.client_id          = Convert.ToInt32(Insert_client_id_txt.Text);
     relative.address_id         = Convert.ToInt32(Insert_address_id_txt.Text);
     relative.relative_help_memo = Insert_relative_help_memo_txt.Text;
     relative.will_help          = Insert_will_help_txt.Text;
     relative = relative.Insert(relative);
     Insert_relative_GridView.DataBind();
     Update_relative_GridView.DataBind();
     Delete_relative_GridView.DataBind();
     return(relative);
 }
Ejemplo n.º 4
0
        public ActionResult Edit(string id)
        {
            RelativeList relativeList = new RelativeList();
            relative     _relative    = relativeList.GetRelativeByCode(id);

            StudentList studentList = new StudentList();


            var obj = studentList.ListAll();

            ViewBag.studentCode = new SelectList(obj, "code", "code", _relative.studentcode);

            return(View(_relative));
        }
 public relative relative_update(int ID)
 {
     relative                    = relative.Select(ID);
     relative.relative_id        = Convert.ToInt32(Update_relative_id_txt.Text);
     relative.case_id            = Convert.ToInt32(Update_case_id_txt.Text);
     relative.client_id          = Convert.ToInt32(Update_client_id_txt.Text);
     relative.address_id         = Convert.ToInt32(Update_address_id_txt.Text);
     relative.relative_help_memo = Update_relative_help_memo_txt.Text;
     relative.will_help          = Update_will_help_txt.Text;
     relative.Update(relative);
     Insert_relative_GridView.DataBind();
     Update_relative_GridView.DataBind();
     Delete_relative_GridView.DataBind();
     return(relative);
 }
Ejemplo n.º 6
0
        public ActionResult Create(relative cl)
        {
            StudentList    studentList = new StudentList();            //Khởi tạo biếm có giá trị là class được khai báo trong models/batch
            List <student> obj         = studentList.ListAll();        //Gọi hàm listall khai báo trong class trong models lấy ra danh sách batch

            ViewBag.studentCode = new SelectList(obj, "code", "code"); //Đưa viewBag vào view
            try
            {
                // TODO: Add insert logic here
                RelativeList relativeList = new RelativeList();
                relativeList.Insert(cl); //Gọi đến hàm addClass trong class ClassList trong models
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 7
0
        public ActionResult Edit(string id, relative cl)
        {
            StudentList studentList = new StudentList();
            var         obj         = studentList.ListAll();

            ViewBag.studentCode = new SelectList(obj, "code", "code");
            try
            {
                // TODO: Add insert logic here
                RelativeList relativeList = new RelativeList();
                relativeList.UpdateRelative(id, cl); //Gọi đến hàm addClass trong class ClassList trong models
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
 protected void INSERT(object sender, EventArgs e)
 {
     relative = relative_insert();
 }
 protected void Insert_Select_Record(object sender, EventArgs e)
 {
     relative = Insert_relative_select(Convert.ToInt32(Insert_relative_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     relative = relative_update(Convert.ToInt32(Update_relative_GridView.SelectedValue));
 }
 protected void Update_Select_Record(object sender, EventArgs e)
 {
     relative = Update_relative_select(Convert.ToInt32(Update_relative_GridView.SelectedValue));
 }
 public relative relative_update(int ID)
 {
     relative = relative.Select(ID);
     relative.relative_id = Convert.ToInt32(Update_relative_id_txt.Text);
     relative.case_id = Convert.ToInt32(Update_case_id_txt.Text);
     relative.client_id = Convert.ToInt32(Update_client_id_txt.Text);
     relative.address_id = Convert.ToInt32(Update_address_id_txt.Text);
     relative.relative_help_memo = Update_relative_help_memo_txt.Text;
     relative.will_help = Update_will_help_txt.Text;
     relative.Update(relative);
     Insert_relative_GridView.DataBind();
     Update_relative_GridView.DataBind();
     Delete_relative_GridView.DataBind();
     return relative;
 }
 public relative relative_insert()
 {
     relative.case_id = Convert.ToInt32(Insert_case_id_txt.Text);
     relative.client_id = Convert.ToInt32(Insert_client_id_txt.Text);
     relative.address_id = Convert.ToInt32(Insert_address_id_txt.Text);
     relative.relative_help_memo = Insert_relative_help_memo_txt.Text;
     relative.will_help = Insert_will_help_txt.Text;
     relative = relative.Insert(relative);
     Insert_relative_GridView.DataBind();
     Update_relative_GridView.DataBind();
     Delete_relative_GridView.DataBind();
     return relative;
 }
 protected void Update_Select_Record(object sender, EventArgs e)
 {
     relative = Update_relative_select(Convert.ToInt32(Update_relative_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     relative = relative_update(Convert.ToInt32(Update_relative_GridView.SelectedValue));
 }
 protected void Insert_Select_Record(object sender, EventArgs e)
 {
     relative = Insert_relative_select(Convert.ToInt32(Insert_relative_GridView.SelectedValue));
 }
 protected void INSERT(object sender, EventArgs e)
 {
     relative = relative_insert();
 }
Ejemplo n.º 18
0
	cs			As Word		'Initial (relative) CS value
Ejemplo n.º 19
0
	ss			As Word		'Initial (relative) SS value