コード例 #1
0
    private void InsertProperty(string igid, string iid)
    {
        string    condition = DataExtension.AndConditon(GroupsItemsTSql.GetByIgid(igid), GroupsItemsTSql.GetByIid(iid));
        DataTable dt        = GroupsItems.GetGroupsItems("1", GroupsItemsColumns.IgiidColumn, condition, "");

        if (dt.Rows.Count == 0)
        {
            GroupsItems.InsertGroupsItems(igid, iid, "", DateTime.Now.ToString(), DateTime.Now.ToString(),
                                          DateTime.Now.ToString(), "");
        }
    }
コード例 #2
0
 protected void btnadd_Click(object sender, EventArgs e)
 {
     int[] iidArry = new int[lstnotadded.Rows + 1];
     iidArry = lstnotadded.GetSelectedIndices();
     if (iidArry.Length > 0)
     {
         for (int i = 0; i < iidArry.Length; i++)
         {
             GroupsItems.InsertGroupsItems(igid, lstnotadded.Items[iidArry[i]].Value, "", DateTime.Now.ToString(),
                                           DateTime.Now.ToString(), DateTime.Now.ToString(), "");
         }
         lstnotadded.Items.Clear();
         lstadded.Items.Clear();
         GetListItem(ddlTagModul.SelectedValue);
     }
 }
コード例 #3
0
 protected void btnadd_Click(object sender, EventArgs e)
 {
     if (lstadded.SelectedValue.Equals(""))
     {
         LtMes.Visible = false;
         GroupsItems.InsertGroupsItems(lstnotadded.SelectedValue, iid, "", DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), "");
         lstnotadded.Items.Clear();
         lstadded.Items.Clear();
         GetGroupsPhotoAlbum();
     }
     else
     {
         LtMes.Visible = true;
         LtMes.Text    = "<div class='MesText'>Album đã trong nhóm <b>" + GroupsExtension.GetNameCategoryById(lstadded.SelectedValue) + "</b></div>";
         return;
     }
 }
コード例 #4
0
    protected void btSave_Click(object sender, EventArgs e)
    {
        //Xoá các bản ghi trong groups_items có vgapp là TatThanhJsc.OtherModul.CodeApplications.Tag
        DataTable dt = new DataTable();

        condition = DataExtension.AndConditon(GroupsItemsTSql.GetGroupsItemsByIid(iid), GroupsTSql.GetGroupsByVgapp(app));
        dt        = GroupsItems.GetAllData("", GroupsItemsColumns.IgiidColumn, condition, "");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //Response.Write(dt.Rows[i][GroupsItemsColumns.IgiidColumn].ToString());
            GroupsItems.DeleteGroupsItems(GroupsItemsTSql.GetGroupsItemsByIgiid(dt.Rows[i][GroupsItemsColumns.IgiidColumn].ToString()));
        }

        //Thêm các bản ghi vào groups_items
        for (int i = 0; i < cblListTag.Items.Count; i++)
        {
            if (cblListTag.Items[i].Selected)
            {
                GroupsItems.InsertGroupsItems(cblListTag.Items[i].Value, iid, "", DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), "0");
            }
        }

        ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('Đã lưu tag');window.close();", true);
    }