Ejemplo n.º 1
0
 public static STD_SubjectStudent GetSTD_SubjectBySubjectID(int SubjectID)
 {
     STD_SubjectStudent sTD_SubjectStudent = new STD_SubjectStudent();
     SqlSTD_SubjectStudentProvider sqlSTD_SubjectStudentProvider = new SqlSTD_SubjectStudentProvider();
     sTD_SubjectStudent = sqlSTD_SubjectStudentProvider.GetSTD_SubjectStudentBySubjectID(SubjectID);
     return sTD_SubjectStudent;
 }
Ejemplo n.º 2
0
    protected void btnAddSubjectStudent_Click(object sender, EventArgs e)
    {
        STD_SubjectStudent sTD_SubjectStudent = new STD_SubjectStudent();
        //	sTD_SubjectStudent.SubjectStudentID=  int.Parse(ddlSubjectStudentID.SelectedValue);
        sTD_SubjectStudent.SubjectStudentName = "0";
        sTD_SubjectStudent.StudentID = hfStudentID.Value;
        sTD_SubjectStudent.SubjectID = int.Parse(ddlSubjectID.SelectedValue);
        sTD_SubjectStudent.AddedBy = Profile.card_id;
        sTD_SubjectStudent.AddedDate = DateTime.Now;
        sTD_SubjectStudent.UpdatedBy = Profile.card_id;
        sTD_SubjectStudent.UpdateDate = DateTime.Now;
        sTD_SubjectStudent.RowStatusID = 1;
        int resutl = STD_SubjectStudentManager.InsertSTD_SubjectStudent(sTD_SubjectStudent);

        //Add fees
        if (txtTotalAmount.Text == "0")
        {
            txtTotalAmount.Text = txtInitialPaymentAmount.Text;
        }
        txtTotalAmount.Text = (decimal.Parse(txtTotalAmount.Text) + decimal.Parse(txtPerSubject.Text)).ToString("0");
        txtCalculateAmount_TextChanged(this, new EventArgs());

        //Receipt Message
        hfSubjects.Value += ","+ ddlSubjectID.SelectedItem.Text.Substring(ddlSubjectID.SelectedItem.Text.IndexOf('-')+2, ddlSubjectID.SelectedItem.Text.Length - ddlSubjectID.SelectedItem.Text.IndexOf('-') - 2);
        txtRemarkForReceipt.Text = @""+(txtInitialPaymentAmount.Text!="0"?"Admission Fees Tk," + txtInitialPaymentAmount.Text + "/-":"")+" Per Paper Fees TK," + txtPerSubject.Text + "*" + (hfSubjects.Value.Split(',').Length-1) + "=" + (decimal.Parse(txtPerSubject.Text) *(hfSubjects.Value.Split(',').Length-1) ).ToString("0")+ "/- (Total: "+txtTotalAmountNeedToPay.Text+"/-) "+ddlCourseIDReceived.SelectedItem.Text+" Paper "+hfSubjects.Value+",";

        loadStudentSubjectData();
    }
Ejemplo n.º 3
0
 public static STD_SubjectStudent GetSTD_RowStatusByRowStatusID(int RowStatusID)
 {
     STD_SubjectStudent sTD_SubjectStudent = new STD_SubjectStudent();
     SqlSTD_SubjectStudentProvider sqlSTD_SubjectStudentProvider = new SqlSTD_SubjectStudentProvider();
     sTD_SubjectStudent = sqlSTD_SubjectStudentProvider.GetSTD_SubjectStudentByRowStatusID(RowStatusID);
     return sTD_SubjectStudent;
 }
Ejemplo n.º 4
0
 public static int InsertSTD_SubjectStudent(STD_SubjectStudent sTD_SubjectStudent)
 {
     SqlSTD_SubjectStudentProvider sqlSTD_SubjectStudentProvider = new SqlSTD_SubjectStudentProvider();
     return sqlSTD_SubjectStudentProvider.InsertSTD_SubjectStudent(sTD_SubjectStudent);
 }
Ejemplo n.º 5
0
 public static bool UpdateSTD_SubjectStudent(STD_SubjectStudent sTD_SubjectStudent)
 {
     SqlSTD_SubjectStudentProvider sqlSTD_SubjectStudentProvider = new SqlSTD_SubjectStudentProvider();
     return sqlSTD_SubjectStudentProvider.UpdateSTD_SubjectStudent(sTD_SubjectStudent);
 }
Ejemplo n.º 6
0
    public bool UpdateSTD_SubjectStudent(STD_SubjectStudent sTD_SubjectStudent)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("UpdateSTD_SubjectStudent", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@SubjectStudentID", SqlDbType.Int).Value = sTD_SubjectStudent.SubjectStudentID;
            cmd.Parameters.Add("@SubjectStudentName", SqlDbType.NVarChar).Value = sTD_SubjectStudent.SubjectStudentName;
            cmd.Parameters.Add("@StudentID", SqlDbType.NVarChar).Value = sTD_SubjectStudent.StudentID;
            cmd.Parameters.Add("@SubjectID", SqlDbType.Int).Value = sTD_SubjectStudent.SubjectID;
            cmd.Parameters.Add("@UpdatedBy", SqlDbType.NVarChar).Value = sTD_SubjectStudent.UpdatedBy;
            cmd.Parameters.Add("@UpdateDate", SqlDbType.DateTime).Value = sTD_SubjectStudent.UpdateDate;
            cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = sTD_SubjectStudent.RowStatusID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
Ejemplo n.º 7
0
    public STD_SubjectStudent GetSTD_SubjectStudentFromReader(IDataReader reader)
    {
        try
        {
            STD_SubjectStudent sTD_SubjectStudent = new STD_SubjectStudent
                (

                     DataAccessObject.IsNULL<int>(reader["SubjectStudentID"]),
                     DataAccessObject.IsNULL<string>(reader["SubjectStudentName"]),
                     DataAccessObject.IsNULL<string>(reader["StudentID"].ToString()),
                     DataAccessObject.IsNULL<int>(reader["SubjectID"]),
                     DataAccessObject.IsNULL<string>(reader["AddedBy"].ToString()),
                     DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]),
                     DataAccessObject.IsNULL<string>(reader["UpdatedBy"].ToString()),
                     DataAccessObject.IsNULL<DateTime>(reader["UpdateDate"]),
                     DataAccessObject.IsNULL<int>(reader["RowStatusID"])
                );
             return sTD_SubjectStudent;
        }
        catch(Exception ex)
        {
            return null;
        }
    }