Ejemplo n.º 1
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        try
        {
            LIB_BookIssue lIB_BookIssue = new LIB_BookIssue();
            //	lIB_BookIssue.BookIssueID=  int.Parse(ddlBookIssueID.SelectedValue);
            lIB_BookIssue.BookID = int.Parse(ddlBookID.SelectedValue);
            lIB_BookIssue.IssedToID = ddlIssedToID.SelectedValue;
            lIB_BookIssue.IsStudent = bool.Parse(radIsStudent.SelectedValue);
            lIB_BookIssue.IssueDate = DateTime.Now;
            lIB_BookIssue.ReturnDate = DateTime.Now.AddDays(7);//DateTime.Parse(txtReturnDate.Text);
            lIB_BookIssue.AddedBy = Profile.card_id;
            lIB_BookIssue.AddedDate = DateTime.Now;
            lIB_BookIssue.ModifiedBy = Profile.card_id;
            lIB_BookIssue.ModifiedDate = DateTime.Now;
            int resutl = LIB_BookIssueManager.InsertLIB_BookIssue(lIB_BookIssue);

            if (resutl == 1)
            {
                this.messageIssue.Text = "Received Successfully!";
            }
        }
        catch (Exception ex) { }
        //Response.Redirect("AdminDisplayLIB_BookIssue.aspx");
    }
Ejemplo n.º 2
0
 public static LIB_BookIssue GetLIB_IssedToByIssedToID(string IssedToID)
 {
     LIB_BookIssue lIB_BookIssue = new LIB_BookIssue();
     SqlLIB_BookIssueProvider sqlLIB_BookIssueProvider = new SqlLIB_BookIssueProvider();
     lIB_BookIssue = sqlLIB_BookIssueProvider.GetLIB_BookIssueByIssedToID(IssedToID);
     return lIB_BookIssue;
 }
Ejemplo n.º 3
0
 public static LIB_BookIssue GetLIB_BookIssueByBookIssueID(int BookIssueID)
 {
     LIB_BookIssue lIB_BookIssue = new LIB_BookIssue();
     SqlLIB_BookIssueProvider sqlLIB_BookIssueProvider = new SqlLIB_BookIssueProvider();
     lIB_BookIssue = sqlLIB_BookIssueProvider.GetLIB_BookIssueByBookIssueID(BookIssueID);
     return lIB_BookIssue;
 }
Ejemplo n.º 4
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         LIB_BookIssue lIB_BookIssue = new LIB_BookIssue();
         lIB_BookIssue.BookIssueID = int.Parse(Request.QueryString["ID"].ToString());
         lIB_BookIssue.BookID = int.Parse(ddlBookID.SelectedValue);
         lIB_BookIssue.IssedToID = ddlIssedToID.SelectedValue;
         lIB_BookIssue.IsStudent = bool.Parse(radIsStudent.SelectedValue);
         lIB_BookIssue.IssueDate = LIB_BookIssueManager.GetLIB_BookIssueByBookIssueID(int.Parse(Request.QueryString["ID"].ToString())).IssueDate;
         lIB_BookIssue.ReturnDate = DateTime.Now;
         lIB_BookIssue.AddedBy = Profile.card_id;
         lIB_BookIssue.AddedDate = DateTime.Now;
         lIB_BookIssue.ModifiedBy = Profile.card_id;
         lIB_BookIssue.ModifiedDate = DateTime.Now;
         bool resutl = LIB_BookIssueManager.UpdateLIB_BookIssue(lIB_BookIssue);
     }
     catch (Exception ex) { } Response.Redirect("AdminDisplayLIB_BookIssue.aspx");
 }
Ejemplo n.º 5
0
    private void showLIB_BookIssueData()
    {
        LIB_BookIssue lIB_BookIssue = new LIB_BookIssue();
        lIB_BookIssue = LIB_BookIssueManager.GetLIB_BookIssueByBookIssueID(Int32.Parse(Request.QueryString["ID"]));
        ddlBookID.SelectedValue = lIB_BookIssue.BookID.ToString();

        ddlIssedToID.SelectedValue = lIB_BookIssue.IssedToID.ToString();
        radIsStudent.SelectedValue = lIB_BookIssue.IsStudent.ToString();
        txtIssueDate.Text = lIB_BookIssue.IssueDate.ToString();
        txtReturnDate.Text = lIB_BookIssue.ReturnDate.ToString();
    }
Ejemplo n.º 6
0
 public static int InsertLIB_BookReceive(LIB_BookIssue lIB_BookIssue)
 {
     SqlLIB_BookIssueProvider sqlLIB_BookIssueProvider = new SqlLIB_BookIssueProvider();
     return sqlLIB_BookIssueProvider.InsertLIB_BookReceive(lIB_BookIssue);
 }
Ejemplo n.º 7
0
 public static bool UpdateLIB_BookIssue(LIB_BookIssue lIB_BookIssue)
 {
     SqlLIB_BookIssueProvider sqlLIB_BookIssueProvider = new SqlLIB_BookIssueProvider();
     return sqlLIB_BookIssueProvider.UpdateLIB_BookIssue(lIB_BookIssue);
 }