private void btnPreview_Click(object sender, EventArgs e)
 {
     DataSet ds_QueryData = new DataSet();
     ds_QueryData = obj_bllFormCustomization.LoadQueryData(txtID.Text);
     //***** For Form Customization View
     frmFormCustomization frmCustomization = new frmFormCustomization(ds_QueryData);
     this.Close();
     frmCustomization.ShowDialog();
 }
Beispiel #2
0
 private void btnPreview_Click(object sender, EventArgs e)
 {
     string strSorting = "";
     if (ds_ViewColumns.Tables[0].Rows.Count > 0)
     {
         for (int g = 0; g <= ds_ViewColumns.Tables[0].Rows.Count - 1; g++)
         {
             if (ds_ViewColumns.Tables[0].Rows[g][1].Equals(true))
             {
                 if (strSorting == "")
                 {
                     strSorting = ds_ViewColumns.Tables[0].Rows[g][0].ToString() + " ASC ";
                 }
                 else
                 {
                     strSorting = strSorting + " , " + ds_ViewColumns.Tables[0].Rows[g][0].ToString() + " ASC ";
                 }
             }
             if (ds_ViewColumns.Tables[0].Rows[g][2].Equals(true))
             {
                 if (strSorting == "")
                 {
                     strSorting = ds_ViewColumns.Tables[0].Rows[g][0].ToString() + " DESC ";
                 }
                 else
                 {
                     strSorting = strSorting + " , " + ds_ViewColumns.Tables[0].Rows[g][0].ToString() + " DESC ";
                 }
             }
         }
     }
     ds_TakeQryData.Tables[0].DefaultView.Sort = strSorting;
     frmFormCustomization obj_FormCustomization = new frmFormCustomization(ds_TakeQryData);
     this.Close();
     //obj_FormCustomization.ds_ViewColumns.Tables[0] = ds_ViewColumns.Tables[0];
     obj_FormCustomization.ShowDialog();
 }