protected void uiLinkButtonAdd_Click(object sender, EventArgs e)
        {
            Mineral objData = new Mineral();
            objData.AddNew();
            objData.MinID = Convert.ToInt32(uiDropDownListMins.SelectedValue);
            objData.CellPrice = uiTextBoxCellPrice.Text;
            objData.BuyPrice = uiTextBoxBuyPrice.Text;
            objData.CreatedDate = DateTime.Now.AddHours(7);
            objData.Save();

            BindData();
        }
        protected void uiLinkButtonUpload_Click(object sender, EventArgs e)
        {
            if (uiFileUploadMines.HasFile)
            {
                uiFileUploadMines.SaveAs(Server.MapPath("~/FileUploads/" + uiFileUploadMines.FileName));
                string connectionString = string.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0;HDR=NO;""", Server.MapPath("~/FileUploads/" + uiFileUploadMines.FileName));

                string strSQL = "SELECT * FROM [sheet1$]";
                OleDbConnection excelConnection = new OleDbConnection(connectionString);
                excelConnection.Open();
                OleDbCommand dbCommand = new OleDbCommand(strSQL, excelConnection);
                OleDbDataAdapter dataAdapter = new OleDbDataAdapter(dbCommand);

                DataTable dTable = new DataTable();

                dataAdapter.Fill(dTable);
                Mineral objData = new Mineral();
                foreach (DataRow item in dTable.Rows)
                {

                    objData.AddNew();
                    objData.MinID = Convert.ToInt32(item[0].ToString());
                    objData.CellPrice = item[1].ToString();
                    objData.BuyPrice = item[2].ToString();
                    objData.CreatedDate = DateTime.Now.AddHours(7);
                }
                objData.Save();
                BindData();

            }
        }