private void GetBookInfo() { try { ds = new DataSet(); objBL = new BL_IssueBook(); objEWA = new EWA_IssueBook(); objEWA.BookId = Convert.ToInt32(ddlBookName.SelectedValue.ToString()); ds = objBL.GetBookInfo_BL(objEWA); if (ds.Tables[0].Rows.Count > 0) { txtAuthor.Text = ds.Tables[0].Rows[0]["Author"].ToString(); txtPublisher.Text = ds.Tables[0].Rows[0]["Publisher"].ToString(); txtPublishYear.Text = ds.Tables[0].Rows[0]["PublishingYear"].ToString(); txtEdition.Text = ds.Tables[0].Rows[0]["Edition"].ToString(); txtPrice.Text = ds.Tables[0].Rows[0]["Price"].ToString(); float stock = db.getDb_Value("select qty from tblLibAddBook where BookId='" + objEWA.BookId + "' and OrgId='" + Convert.ToInt32(Session["OrgId"]) + "'"); lblstock.Text = stock.ToString(); } else { txtAuthor.Text = ""; txtPublisher.Text = ""; txtPublishYear.Text = ""; txtEdition.Text = ""; txtPrice.Text = ""; } } catch (Exception ex) { } }
protected void txtIssueTo_TextChanged(object sender, EventArgs e) { ds = new DataSet(); objBL = new BL_IssueBook(); objEWA = new EWA_IssueBook(); objEWA.StudentCode = txtIssueTo.Text.ToString(); ds = objBL.GetStudentInfo_BL(objEWA); if (ds.Tables[0].Rows.Count > 0) { ViewState["StudentId"] = ds.Tables[0].Rows[0]["StudentId"].ToString(); txtIssueName.Text = ds.Tables[0].Rows[0]["StdName"].ToString(); } else { ViewState["StudentId"] = "0"; txtIssueName.Text = ""; } }
private void GetBookGroup() { try { ds = new DataSet(); objBL = new BL_IssueBook(); objEWA.OrgId = Convert.ToInt32(orgId.ToString()); ds = objBL.GetBookGroup_BL(objEWA); ddlGroupName.DataSource = ds; ddlGroupName.DataTextField = "GroupCode"; ddlGroupName.DataValueField = "GroupId"; ddlGroupName.DataBind(); ddlGroupName.Items.Insert(0, new ListItem("Select", "0")); } catch (Exception ex) { } }
private void GetIsueeBook() { try { ds = new DataSet(); objBL = new BL_IssueBook(); objEWA.OrgId = Convert.ToInt32(orgId.ToString()); ds = objBL.GetIsueeBook_BL(objEWA); if (ds != null) { GrdBook.DataSource = ds; GrdBook.DataBind(); } GrdBook.EmptyDataText = "Record Not Found "; GrdBook.DataBind(); } catch (Exception ex) { } }