예제 #1
0
    //protected void rptResultTB_ItemDataBound(object sender, RepeaterItemEventArgs e)
    //{
    //    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
    //    {
    //        LinkButton btnDelete = (LinkButton)e.Item.FindControl("btnDelete");
    //        LinkButton btnEdit = (LinkButton)e.Item.FindControl("btnEdit");
    //        btnDelete.Visible = AllowEdit;
    //        btnEdit.Visible = AllowEdit;
    //    }
    //}
    public void btnSaveSolution_Click(object sender, EventArgs e)
    {
        GiaiPhap        gp    = new GiaiPhap();
        GiaiPhapService gpser = new GiaiPhapService();

        gp.EnterpriseId = Convert.ToInt32(memVal.OrgId);
        if (txtnamegp.Text != "")
        {
            gp.MoTa        = txtmotagp.Text;
            gp.TenGiaiPhap = txtnamegp.Text;
            if (gpser.Insert(gp) > 0)
            {
                ltNoticeSolution.Text = "Lưu giải pháp mới thành công";
                BindSolution();
            }
            else
            {
                ltNoticeSolution.Text = "Không lưu được giải pháp mới. Vui lòng thử lại";
            }
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, GetType(), "showGP", "showgiaiphap();", true);
            ScriptManager.RegisterStartupScript(this, GetType(), "ac", "alert('Chưa nhập tên giải pháp!');", true);
        }
    }
예제 #2
0
        public GiaiPhap Update(GiaiPhap obj)
        {
            GiaiPhapBO giaiphapBO = new GiaiPhapBO(obj);

            giaiphapDao.Update(giaiphapBO);
            return(obj);
        }
예제 #3
0
    public void btnSaveSolution_Click(object sender, EventArgs e)
    {
        int eid = 0;

        if (hdnSolutionId.Value != "0")
        {
            eid = Convert.ToInt32(hdnSolutionId.Value);
        }
        GiaiPhap        gp    = new GiaiPhap();
        GiaiPhapService gpser = new GiaiPhapService();

        if (eid > 0)
        {
            if (txtnamegp.Text != "")
            {
                gp.EnterpriseId = m_UserValidation.OrgId;
                gp.Id           = eid;
                gp.MoTa         = txtmotagp.Text;
                gp.TenGiaiPhap  = txtnamegp.Text;
                if (gpser.Update(gp) != null)
                {
                    ltNoticeSolution.Text = "<div class='alert alert-info'>Cập nhật thành công !</div>";
                    BindData();
                }
                else
                {
                    ltNoticeSolution.Text = "<div class='alert alert-danger'>Không lưu được giải pháp mới. Vui lòng thử lại</div>";
                }
            }
        }
        else
        {
            gp.EnterpriseId = m_UserValidation.OrgId;
            if (txtnamegp.Text != "")
            {
                gp.MoTa        = txtmotagp.Text;
                gp.TenGiaiPhap = txtnamegp.Text;
                gp.IsDelete    = false;
                if (gpser.Insert(gp) > 0)
                {
                    ltNoticeSolution.Text = "<div class='alert alert-info'>Đã thêm giải pháp mới thành công</div>";
                    BindData();
                }
                else
                {
                    ltNoticeSolution.Text = "<div class='alert alert-danger'>Không lưu được giải pháp mới. Vui lòng thử lại</div>";
                }
            }
        }
    }
    public void btnSaveSolution_Click(object sender, EventArgs e)
    {
        GiaiPhap        gp    = new GiaiPhap();
        GiaiPhapService gpser = new GiaiPhapService();

        gp.EnterpriseId = memVal.OrgId;

        gp.MoTa        = txtDes.Text;
        gp.TenGiaiPhap = txtSolutionName.Text;
        if (gpser.Insert(gp) > 0)
        {
            ltNoticeSolution.Text = "Lưu giải pháp mới thành công";
            BindSolution();
        }
        else
        {
            ltNoticeSolution.Text = "Không lưu được giải pháp mới. Vui lòng thử lại";
        }
    }
예제 #5
0
        public int Insert(GiaiPhap obj)
        {
            GiaiPhapBO giaiphapBO = new GiaiPhapBO(obj);

            return(giaiphapDao.Insert(giaiphapBO));
        }