//MAP


        //Init
        protected virtual void initConstructor(DBMAINContext poDB)
        {
            //DBContext
            this.db = poDB;
            //VM
            this.oViewModel = new Transaction_indetailVM();
            //DATA
            this.oData               = new Transaction_indetailVM();
            this.oData_list          = new List <Transaction_indetailVM>();
            this.oDatastudent        = new StudentVM();
            this.oDatastudent.DETAIL = new StudentdetailVM();

            //DS
            this.oDS          = new Transaction_inDS(this.db);
            this.oDSDetail    = new Transaction_indDS(this.db);
            this.oDS_inst     = new Installment_inDS(this.db);
            this.oDSStudent   = new StudentDS(this.db);
            this.oDSClasstype = new ClasstypeDS(this.db);
            this.oDSClassroom = new ClassroomDS(this.db);
            this.oDSYear      = new YearDS(db);
            this.oDSMonth     = new MonthsppDS();
            //CRUD
            this.oCRUD        = new Transaction_inCRUD(this.db);
            this.oCRUD_detail = new Transaction_indCRUD(this.db);
            this.oCRUD_inst   = new Installment_inCRUD(this.db);

            //BL
            oBL = new Transaction_inBL();
            //MAP
            //VIEWBAG
            ViewBag.Controllername = "";
            ViewBag.Viewlocation   = "~/Views/Transaction_in/";
            ViewBag.Viewextention  = ".cshtml";
        } //End initConstructor
        public override global::System.Data.DataSet Clone()
        {
            StudentDS cln = ((StudentDS)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            StudentDS ds = new StudentDS();

            global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny         any      = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace))
            {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                    {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length))
                        {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) &&
                                    (s1.ReadByte() == s2.ReadByte()));)
                            {
                                ;
                            }
                            if ((s1.Position == s1.Length))
                            {
                                return(type);
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null))
                    {
                        s1.Close();
                    }
                    if ((s2 != null))
                    {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return(type);
        }
 public StudentDS GetStudents()
 {
     using (SqlConnection con = new SqlConnection(_connectionString))
     {
         con.Open();
         string sql = @"SELECT  
                 Id,
                 FirstName,
                 LastName,
                 Gender,
                 Country,
                 City
             FROM 
                 Student";
         using (SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sql, con))
         {
             StudentDS studentDS = new StudentDS();
             sqlDataAdapter.Fill(studentDS, "Student");
             return(studentDS);
         }
     }
 }
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                StudentDS ds = new StudentDS();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "StudentDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }
Example #6
0
        } //End public static void setValidCredential()

        public static void setValidCredential(string psUsername = null, UsercredentialVM poViewmodel = null, int?pnMdleId = null)
        {
            hlpConfig.SessionInfo.setAppUsername(psUsername);
            hlpConfig.SessionInfo.setAppUserdisplayname(poViewmodel.DISPLAY_NAME);
            hlpConfig.SessionInfo.setAppUserId(poViewmodel.ID);
            hlpConfig.SessionInfo.setAppRoleId(poViewmodel.ROLE_ID);
            hlpConfig.SessionInfo.setAppResId(poViewmodel.RES_ID);
            hlpConfig.SessionInfo.setAppMdleId(pnMdleId);
            hlpConfig.SessionInfo.setAppUserIMG(poViewmodel.USER_IMG);


            string sTempinfo1 = "";
            string sTempinfo2 = "";
            string sTempinfo3 = "";
            string sTempinfo4 = "";
            string sIMG       = Utility_FileUploadDownload.getImage_UserNA();

            if (poViewmodel.ROLE_ID == APPBASE.Svcbiz.valFLAG.FLAG_ROLE_P)
            {
                StudentDS oDSStudent = new StudentDS();
                var       oData      = oDSStudent.getData_shortinfo(poViewmodel.RES_ID);
                if (oData != null)
                {
                    if (oData.STUDENT_IMG != null)
                    {
                        sIMG = Utility_FileUploadDownload.getImage_Student(oData.STUDENT_IMG);
                    }
                    sTempinfo1 = "";
                    if (oData.BRANCH_DESC != null)
                    {
                        sTempinfo1 = oData.BRANCH_DESC;
                    }
                    sTempinfo2 = "";
                    if (oData.CLASSTYPE_NAME != null)
                    {
                        sTempinfo2 = oData.CLASSTYPE_NAME;
                    }
                    sTempinfo3 = "";
                    if (oData.CLASSROOM_NAME != null)
                    {
                        sTempinfo3 = oData.CLASSROOM_NAME;
                    }
                    sTempinfo4 = "";
                    if (oData.CLASSTYPE_ID != null)
                    {
                        sTempinfo4 = oData.CLASSTYPE_ID.ToString();
                    }
                } //End if (oData != null)
            }     //End if (poViewmodel.ROLE_ID == APPBASE.Svcbiz.valFLAG.FLAG_ROLE_P)
            else
            {
                EmployeeDS oDSEmployee = new EmployeeDS();
                var        oData       = oDSEmployee.getData_shortinfo(poViewmodel.RES_ID);
                if (oData != null)
                {
                    if (oData.EMPLOYEE_IMG != null)
                    {
                        sIMG = Utility_FileUploadDownload.getImage_Employee(oData.EMPLOYEE_IMG);
                    }
                    sTempinfo1 = "";
                    if (oData.BRANCH_DESC != null)
                    {
                        sTempinfo1 = oData.BRANCH_DESC;
                    }
                    sTempinfo2 = "";
                    if (oData.SENTRA_NAME != null)
                    {
                        sTempinfo2 = oData.SENTRA_NAME;
                    }
                    sTempinfo3 = "";
                    if (oData.JOBTITLE_DESC != null)
                    {
                        sTempinfo3 = oData.JOBTITLE_DESC;
                    }
                } //End if (oData != null)
            }     //End if (poViewmodel.ROLE_ID == APPBASE.Svcbiz.valFLAG.FLAG_ROLE_P)
            hlpConfig.SessionInfo.setAppResIMG(sIMG);
            hlpConfig.SessionInfo.setAppResinfo1(sTempinfo1);
            hlpConfig.SessionInfo.setAppResinfo2(sTempinfo2);
            hlpConfig.SessionInfo.setAppResinfo3(sTempinfo3);
            hlpConfig.SessionInfo.setAppResinfo4(sTempinfo4);
        } //End public static void setValidCredential()
 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
     global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
     global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
     StudentDS ds = new StudentDS();
     global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
     any1.Namespace = "http://www.w3.org/2001/XMLSchema";
     any1.MinOccurs = new decimal(0);
     any1.MaxOccurs = decimal.MaxValue;
     any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     sequence.Items.Add(any1);
     global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
     any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
     any2.MinOccurs = new decimal(1);
     any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     sequence.Items.Add(any2);
     global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
     attribute1.Name = "namespace";
     attribute1.FixedValue = ds.Namespace;
     type.Attributes.Add(attribute1);
     global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
     attribute2.Name = "tableTypeName";
     attribute2.FixedValue = "StudentDataTable";
     type.Attributes.Add(attribute2);
     type.Particle = sequence;
     global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
     if (xs.Contains(dsSchema.TargetNamespace)) {
         global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
         global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
         try {
             global::System.Xml.Schema.XmlSchema schema = null;
             dsSchema.Write(s1);
             for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
                 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                 s2.SetLength(0);
                 schema.Write(s2);
                 if ((s1.Length == s2.Length)) {
                     s1.Position = 0;
                     s2.Position = 0;
                     for (; ((s1.Position != s1.Length) 
                                 && (s1.ReadByte() == s2.ReadByte())); ) {
                         ;
                     }
                     if ((s1.Position == s1.Length)) {
                         return type;
                     }
                 }
             }
         }
         finally {
             if ((s1 != null)) {
                 s1.Close();
             }
             if ((s2 != null)) {
                 s2.Close();
             }
         }
     }
     xs.Add(dsSchema);
     return type;
 }
 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
     StudentDS ds = new StudentDS();
     global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
     global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
     global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
     any.Namespace = ds.Namespace;
     sequence.Items.Add(any);
     type.Particle = sequence;
     global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
     if (xs.Contains(dsSchema.TargetNamespace)) {
         global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
         global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
         try {
             global::System.Xml.Schema.XmlSchema schema = null;
             dsSchema.Write(s1);
             for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
                 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                 s2.SetLength(0);
                 schema.Write(s2);
                 if ((s1.Length == s2.Length)) {
                     s1.Position = 0;
                     s2.Position = 0;
                     for (; ((s1.Position != s1.Length) 
                                 && (s1.ReadByte() == s2.ReadByte())); ) {
                         ;
                     }
                     if ((s1.Position == s1.Length)) {
                         return type;
                     }
                 }
             }
         }
         finally {
             if ((s1 != null)) {
                 s1.Close();
             }
             if ((s2 != null)) {
                 s2.Close();
             }
         }
     }
     xs.Add(dsSchema);
     return type;
 }