ign="justify">}
# endregionGridView1_Sorting (object sender, GridViewSortEventArgs e)
{(e.SortExpression, ConvertSortDirectionToSql (e.SortDirection), raquo ;, );
} (SortDirectionsortDirection)
{= String.Empty; (sortDirection)
{. Ascending:= ASC raquo ;;;. Descending:= DESC raquo ;;;
};
}
}
}System;.Collections.Generic;.Linq;.Web;.Web.UI;.Web.UI.WebControls;.Data;.Data.SqlClient;Monitoring
{_ ingener: System.Web.UI.Page
{_ Load (object sender, EventArgs e)
{(! IsPostBack)
{( raquo ;, raquo ;, raquo ;, raquo ;, raquo ;, );
}
} Button2_Click (object sender, EventArgs e)
{( raquo ;, raquo ;, Convert.ToString (DropDownList1.SelectedValue), TextBox1.Text, Convert.ToString (Calendar1.SelectedDate), Convert.ToString (Calendar2.SelectedDate) );
} ()
{System.Configuration.ConfigurationManager.ConnectionStrings[laquo;MonitoringConnectionStringraquo;].ConnectionString;
}
# region Bind GridView (stringsortExp, stringsortDir, string par1, string par2, string par3, string par4)
{= newDataTable (); connection=newSqlConnection (GetConnectionString ());
{. Open ();=string.Empty; (par1!=string.Empty amp; amp; par2!=string.Empty)
{= SELECT * FROM View_1 Where КодДеталі=@ par1 and Ліміт=@ par2 and Дата Between @ par3 and @ par4 raquo ;;
}= SELECT * FROM View_1 raquo ;;=newSqlCommand (sqlStatement, connection);=newSqlDataAdapter (cmd) ;. Parameters.AddWithValue ( @ par1 raquo ;, par1) ;. Parameters.AddWithValue ( @ par2 raquo ;, par2) ;. Parameters.AddWithValue ( @ par3 raquo ;, par3) ;. Parameters.AddWithValue ( @ par4 raquo ;, par4) ;. CommandType=CommandType.Text; .ExecuteNonQuery ();.Fill (dt); (dt.Rows.Count gt; 0)
{= newDataView ();=dt.DefaultView;
(sortExp!=string.Empty)
{
//myDataView.Sort=string.Format ( {0} {1} raquo ;, sortExp, sortDir);
}. DataSource=myDataView; .DataBind ();
}
} (SqlException ex)
{= Fetch Error: raquo ;; +=ex.Message; (msg);
}
{. Close ();
}
}
# endregionGridView1_Sorting (object sender, GridViewSortEventArgs e)
{(e.SortExpression, ConvertSortDirectionToSql (e.SortDirection), raquo ;, raquo ;, raquo ;, );
} (SortDirectionsortDirection)
{= String.Empty; (sortDirection)
{. Ascending:= ASC raquo ;;;. Descending:= DESC raquo ;;;
}
;
}
}
}System;.Collections.Generic;.Linq;.Web;.Web.UI;.Web.UI.WebControls;.Data.SqlClient;.Data;Monitoring
{_ kladovshik_add: System.Web.UI.Page
{_ Load (object sender, EventArgs e)
{
} ()
{System.Configuration.ConfigurationManager.ConnectionStrings[laquo;MonitoringConnectionStringraquo;].ConnectionString;
} (string par1, string par2, string par3, string par4, string par5)
{connection=newSqlConnection (GetConnectionString ());=string.Empty;
sqlStatement= INSERT INTO ГотоваяПродукція +
(Код, КодДеталі, Значення, Дата, ТіпОпераціі) +
VALUES (@ par1, @ par2, @ par3, @ par4, @ par5) raquo ;;
{. Open ();=newSqlCommand (sqlStatement, connection) ;. Parameters.AddWithValue ( @ par1 raquo ;, par1) ;. Parameters.AddWithValue ( @ par2 raquo ;, par2);.Parameters.AddWithValue ( @ par3 raquo ;, par3) ;. Parameters.AddWithValue ( @ par4 raquo ;, par4) ;. Parameters.AddWithValue ( @ par5 raquo ;, par5);
;. CommandType=CommandType.Text; .ExecuteNonQuery ();
} (SqlException ex)
{= Insert Error: raquo ;; +=ex.Message; (msg);
}
{. Close ();
}
} Button1_Click (object sender, EventArgs e)
{= DateTime.Now; (TextBo...